Author: markt
Date: Fri Sep 12 12:16:03 2014
New Revision: 1624514
URL: http://svn.apache.org/r1624514
Log:
Backport of unused code removal from trunk
Removed:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Field.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Method.java
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationDefault.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Code.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantValue.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Deprecated.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/EnclosingMethod.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ExceptionTable.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/FieldOrMethod.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClasses.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumber.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumberTable.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTypeTable.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleAnnotations.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleParameterAnnotations.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleParameterAnnotations.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Signature.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/SourceFile.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMap.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTable.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Synthetic.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Unknown.java
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1397980,1397985,1397988
Propchange: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/
------------------------------------------------------------------------------
Merged /tomcat/trunk/java/org/apache/tomcat/util/bcel:r1397980,1397985,1397988
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationDefault.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationDefault.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationDefault.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationDefault.java
Fri Sep 12 12:16:03 2014
@@ -75,11 +75,4 @@ public class AnnotationDefault extends A
{
default_value = defaultValue;
}
-
-
- @Override
- public Attribute copy(ConstantPool _constant_pool)
- {
- throw new RuntimeException("Not implemented yet!");
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java
Fri Sep 12 12:16:03 2014
@@ -203,9 +203,4 @@ public abstract class Attribute implemen
}
return attr;
}
-
- /**
- * @return deep copy of this attribute
- */
- public abstract Attribute copy(ConstantPool _constant_pool);
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
Fri Sep 12 12:16:03 2014
@@ -51,8 +51,8 @@ public final class ClassParser {
private int access_flags; // Access rights of parsed class
private int[] interfaces; // Names of implemented interfaces
private ConstantPool constant_pool; // collection of constants
- private Field[] fields; // class fields, i.e., its variables
- private Method[] methods; // methods defined in the class
+ private FieldOrMethod[] fields; // class fields, i.e., its variables
+ private FieldOrMethod[] methods; // methods defined in the class
private Attribute[] attributes; // attributes defined in the class
private boolean is_zip; // Loaded from zip file
private static final int BUFSIZE = 8192;
@@ -216,9 +216,9 @@ public final class ClassParser {
private void readFields() throws IOException, ClassFormatException {
int fields_count;
fields_count = file.readUnsignedShort();
- fields = new Field[fields_count];
+ fields = new FieldOrMethod[fields_count];
for (int i = 0; i < fields_count; i++) {
- fields[i] = new Field(file, constant_pool);
+ fields[i] = new FieldOrMethod(file, constant_pool);
}
}
@@ -261,9 +261,9 @@ public final class ClassParser {
private void readMethods() throws IOException, ClassFormatException {
int methods_count;
methods_count = file.readUnsignedShort();
- methods = new Method[methods_count];
+ methods = new FieldOrMethod[methods_count];
for (int i = 0; i < methods_count; i++) {
- methods[i] = new Method(file, constant_pool);
+ methods[i] = new FieldOrMethod(file, constant_pool);
}
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Code.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Code.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Code.java
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Code.java
Fri Sep 12 12:16:03 2014
@@ -160,29 +160,4 @@ public final class Code extends Attribut
exception_table_length = (exception_table == null) ? 0 :
exception_table.length;
length = calculateLength(); // Adjust length
}
-
-
- /**
- * @return deep copy of this attribute
- *
- * @param _constant_pool the constant pool to duplicate
- */
- @Override
- public Attribute copy( ConstantPool _constant_pool ) {
- Code c = (Code) clone();
- if (code != null) {
- c.code = new byte[code.length];
- System.arraycopy(code, 0, c.code, 0, code.length);
- }
- c.constant_pool = _constant_pool;
- c.exception_table = new CodeException[exception_table_length];
- for (int i = 0; i < exception_table_length; i++) {
- c.exception_table[i] = exception_table[i].copy();
- }
- c.attributes = new Attribute[attributes_count];
- for (int i = 0; i < attributes_count; i++) {
- c.attributes[i] = attributes[i].copy(_constant_pool);
- }
- return c;
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java
Fri Sep 12 12:16:03 2014
@@ -47,16 +47,4 @@ public final class CodeException impleme
file.readUnsignedShort(); // Unused handler_pc
file.readUnsignedShort(); // Unused catch_type
}
-
-
- /**
- * @return deep copy of this object
- */
- public CodeException copy() {
- try {
- return (CodeException) clone();
- } catch (CloneNotSupportedException e) {
- }
- return null;
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantValue.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantValue.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantValue.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantValue.java
Fri Sep 12 12:16:03 2014
@@ -45,15 +45,4 @@ public final class ConstantValue extends
super(name_index, length, constant_pool);
file.readUnsignedShort(); // Unused constantvalue_index
}
-
-
- /**
- * @return deep copy of this attribute
- */
- @Override
- public Attribute copy( ConstantPool _constant_pool ) {
- ConstantValue c = (ConstantValue) clone();
- c.constant_pool = _constant_pool;
- return c;
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Deprecated.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Deprecated.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Deprecated.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Deprecated.java
Fri Sep 12 12:16:03 2014
@@ -63,19 +63,4 @@ public final class Deprecated extends At
System.err.println("Deprecated attribute with length > 0");
}
}
-
-
- /**
- * @return deep copy of this attribute
- */
- @Override
- public Attribute copy( ConstantPool _constant_pool ) {
- Deprecated c = (Deprecated) clone();
- if (bytes != null) {
- c.bytes = new byte[bytes.length];
- System.arraycopy(bytes, 0, c.bytes, 0, bytes.length);
- }
- c.constant_pool = _constant_pool;
- return c;
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/EnclosingMethod.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/EnclosingMethod.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/EnclosingMethod.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/EnclosingMethod.java
Fri Sep 12 12:16:03 2014
@@ -36,9 +36,4 @@ public class EnclosingMethod extends Att
// Unused method index
dis.readUnsignedShort();
}
-
- @Override
- public Attribute copy(ConstantPool constant_pool) {
- throw new RuntimeException("Not implemented yet!");
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ExceptionTable.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ExceptionTable.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ExceptionTable.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ExceptionTable.java
Fri Sep 12 12:16:03 2014
@@ -78,20 +78,4 @@ public final class ExceptionTable extend
this.exception_index_table = exception_index_table;
number_of_exceptions = (exception_index_table == null) ? 0 :
exception_index_table.length;
}
-
-
- /**
- * @return deep copy of this attribute
- */
- @Override
- public Attribute copy( ConstantPool _constant_pool ) {
- ExceptionTable c = (ExceptionTable) clone();
- if (exception_index_table != null) {
- c.exception_index_table = new int[exception_index_table.length];
- System.arraycopy(exception_index_table, 0,
c.exception_index_table, 0,
- exception_index_table.length);
- }
- c.constant_pool = _constant_pool;
- return c;
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/FieldOrMethod.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/FieldOrMethod.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/FieldOrMethod.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/FieldOrMethod.java
Fri Sep 12 12:16:03 2014
@@ -21,16 +21,35 @@ import java.io.DataInputStream;
import java.io.IOException;
import org.apache.tomcat.util.bcel.Constants;
+import org.apache.tomcat.util.bcel.util.BCELComparator;
/**
- * Abstract super class for fields and methods.
+ * Class for fields and methods.
*
* @author <A HREF="mailto:[email protected]">M. Dahm</A>
*/
-public abstract class FieldOrMethod extends AccessFlags implements Cloneable {
+public class FieldOrMethod extends AccessFlags implements Cloneable {
private static final long serialVersionUID = -3383525930205542157L;
- protected int name_index; // Points to field name in constant pool
+ private static BCELComparator _cmp = new BCELComparator() {
+
+ @Override
+ public boolean equals( Object o1, Object o2 ) {
+ FieldOrMethod THIS = (FieldOrMethod) o1;
+ FieldOrMethod THAT = (FieldOrMethod) o2;
+ return THIS.getName().equals(THAT.getName())
+ && THIS.getSignature().equals(THAT.getSignature());
+ }
+
+
+ @Override
+ public int hashCode( Object o ) {
+ FieldOrMethod THIS = (FieldOrMethod) o;
+ return THIS.getSignature().hashCode() ^ THIS.getName().hashCode();
+ }
+ };
+
+ protected int name_index; // Points to field name in constant pool
protected int signature_index; // Points to encoded signature
protected int attributes_count; // No. of attributes
protected Attribute[] attributes; // Collection of attributes
@@ -103,4 +122,28 @@ public abstract class FieldOrMethod exte
c = (ConstantUtf8) constant_pool.getConstant(signature_index,
Constants.CONSTANT_Utf8);
return c.getBytes();
}
+
+ /**
+ * Return value as defined by given BCELComparator strategy.
+ * By default two FieldOrMethod objects are said to be equal when
+ * their names and signatures are equal.
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals( Object obj ) {
+ return _cmp.equals(this, obj);
+ }
+
+
+ /**
+ * Return value as defined by given BCELComparator strategy.
+ * By default return the hashcode of the FieldOrMethod's name XOR
signature.
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ return _cmp.hashCode(this);
+ }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java
Fri Sep 12 12:16:03 2014
@@ -44,16 +44,4 @@ public final class InnerClass implements
file.readUnsignedShort(); // Unused inner_name_index
file.readUnsignedShort(); // Unused inner_access_flags
}
-
-
- /**
- * @return deep copy of this object
- */
- public InnerClass copy() {
- try {
- return (InnerClass) clone();
- } catch (CloneNotSupportedException e) {
- }
- return null;
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClasses.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClasses.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClasses.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClasses.java
Fri Sep 12 12:16:03 2014
@@ -76,19 +76,4 @@ public final class InnerClasses extends
this.inner_classes = inner_classes;
number_of_classes = (inner_classes == null) ? 0 : inner_classes.length;
}
-
-
- /**
- * @return deep copy of this attribute
- */
- @Override
- public Attribute copy( ConstantPool _constant_pool ) {
- InnerClasses c = (InnerClasses) clone();
- c.inner_classes = new InnerClass[number_of_classes];
- for (int i = 0; i < number_of_classes; i++) {
- c.inner_classes[i] = inner_classes[i].copy();
- }
- c.constant_pool = _constant_pool;
- return c;
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumber.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumber.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumber.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumber.java
Fri Sep 12 12:16:03 2014
@@ -43,16 +43,4 @@ public final class LineNumber implements
file.readUnsignedShort(); // Unused start_pc
file.readUnsignedShort(); // Unused line_number
}
-
-
- /**
- * @return deep copy of this object
- */
- public LineNumber copy() {
- try {
- return (LineNumber) clone();
- } catch (CloneNotSupportedException e) {
- }
- return null;
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumberTable.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumberTable.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumberTable.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumberTable.java
Fri Sep 12 12:16:03 2014
@@ -75,19 +75,4 @@ public final class LineNumberTable exten
this.line_number_table = line_number_table;
line_number_table_length = (line_number_table == null) ? 0 :
line_number_table.length;
}
-
-
- /**
- * @return deep copy of this attribute
- */
- @Override
- public Attribute copy( ConstantPool _constant_pool ) {
- LineNumberTable c = (LineNumberTable) clone();
- c.line_number_table = new LineNumber[line_number_table_length];
- for (int i = 0; i < line_number_table_length; i++) {
- c.line_number_table[i] = line_number_table[i].copy();
- }
- c.constant_pool = _constant_pool;
- return c;
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java
Fri Sep 12 12:16:03 2014
@@ -47,16 +47,4 @@ public final class LocalVariable impleme
file.readUnsignedShort(); // Unused signature_index
file.readUnsignedShort(); // Unused index
}
-
-
- /**
- * @return deep copy of this object
- */
- public LocalVariable copy() {
- try {
- return (LocalVariable) clone();
- } catch (CloneNotSupportedException e) {
- }
- return null;
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java
Fri Sep 12 12:16:03 2014
@@ -73,19 +73,4 @@ public class LocalVariableTable extends
? 0
: local_variable_table.length;
}
-
-
- /**
- * @return deep copy of this attribute
- */
- @Override
- public Attribute copy( ConstantPool _constant_pool ) {
- LocalVariableTable c = (LocalVariableTable) clone();
- c.local_variable_table = new
LocalVariable[local_variable_table_length];
- for (int i = 0; i < local_variable_table_length; i++) {
- c.local_variable_table[i] = local_variable_table[i].copy();
- }
- c.constant_pool = _constant_pool;
- return c;
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTypeTable.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTypeTable.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTypeTable.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTypeTable.java
Fri Sep 12 12:16:03 2014
@@ -75,20 +75,4 @@ private int local_variable_t
local_variable_type_table_length = (local_variable_table == null)? 0 :
local_variable_table.length;
}
-
-
- /**
- * @return deep copy of this attribute
- */
- @Override
- public Attribute copy(ConstantPool constant_pool) {
- LocalVariableTypeTable c = (LocalVariableTypeTable)clone();
-
- c.local_variable_type_table = new
LocalVariable[local_variable_type_table_length];
- for(int i=0; i < local_variable_type_table_length; i++)
- c.local_variable_type_table[i] = local_variable_type_table[i].copy();
-
- c.constant_pool = constant_pool;
- return c;
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java
Fri Sep 12 12:16:03 2014
@@ -46,13 +46,4 @@ public final class PMGClass extends Attr
file.readUnsignedShort(); // Unused pmg_index
file.readUnsignedShort(); // Unused pmg_class_index
}
-
-
- /**
- * @return deep copy of this attribute
- */
- @Override
- public Attribute copy( ConstantPool _constant_pool ) {
- return (PMGClass) clone();
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleAnnotations.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleAnnotations.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleAnnotations.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleAnnotations.java
Fri Sep 12 12:16:03 2014
@@ -47,14 +47,4 @@ public class RuntimeInvisibleAnnotations
{
super(name_index, length, file, constant_pool);
}
-
- /**
- * @return deep copy of this attribute
- */
- @Override
- public Attribute copy(ConstantPool constant_pool)
- {
- Annotations c = (Annotations) clone();
- return c;
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleParameterAnnotations.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleParameterAnnotations.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleParameterAnnotations.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleParameterAnnotations.java
Fri Sep 12 12:16:03 2014
@@ -42,14 +42,4 @@ public class RuntimeInvisibleParameterAn
ConstantPool constant_pool) throws IOException {
super(name_index, length, file, constant_pool);
}
-
-
- /**
- * @return deep copy of this attribute
- */
- @Override
- public Attribute copy( ConstantPool constant_pool ) {
- Annotations c = (Annotations) clone();
- return c;
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java
Fri Sep 12 12:16:03 2014
@@ -47,14 +47,4 @@ public class RuntimeVisibleAnnotations e
{
super(name_index, length, file, constant_pool);
}
-
- /**
- * @return deep copy of this attribute
- */
- @Override
- public Attribute copy(ConstantPool constant_pool)
- {
- Annotations c = (Annotations) clone();
- return c;
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleParameterAnnotations.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleParameterAnnotations.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleParameterAnnotations.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleParameterAnnotations.java
Fri Sep 12 12:16:03 2014
@@ -42,14 +42,4 @@ public class RuntimeVisibleParameterAnno
ConstantPool constant_pool) throws IOException {
super(name_index, length, file, constant_pool);
}
-
-
- /**
- * @return deep copy of this attribute
- */
- @Override
- public Attribute copy( ConstantPool constant_pool ) {
- Annotations c = (Annotations) clone();
- return c;
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Signature.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Signature.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Signature.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Signature.java
Fri Sep 12 12:16:03 2014
@@ -45,13 +45,4 @@ public final class Signature extends Att
super(name_index, length, constant_pool);
file.readUnsignedShort(); // Unused signature_index
}
-
-
- /**
- * @return deep copy of this attribute
- */
- @Override
- public Attribute copy( ConstantPool _constant_pool ) {
- return (Signature) clone();
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/SourceFile.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/SourceFile.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/SourceFile.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/SourceFile.java
Fri Sep 12 12:16:03 2014
@@ -47,13 +47,4 @@ public final class SourceFile extends At
super(name_index, length, constant_pool);
file.readUnsignedShort(); // Unused sourcefile_index
}
-
-
- /**
- * @return deep copy of this attribute
- */
- @Override
- public Attribute copy( ConstantPool _constant_pool ) {
- return (SourceFile) clone();
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMap.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMap.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMap.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMap.java
Fri Sep 12 12:16:03 2014
@@ -79,19 +79,4 @@ public final class StackMap extends Attr
this.map = map;
map_length = (map == null) ? 0 : map.length;
}
-
-
- /**
- * @return deep copy of this attribute
- */
- @Override
- public Attribute copy( ConstantPool _constant_pool ) {
- StackMap c = (StackMap) clone();
- c.map = new StackMapEntry[map_length];
- for (int i = 0; i < map_length; i++) {
- c.map[i] = map[i].copy();
- }
- c.constant_pool = _constant_pool;
- return c;
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java
Fri Sep 12 12:16:03 2014
@@ -46,7 +46,10 @@ public final class StackMapEntry impleme
* @throws IOException
*/
StackMapEntry(DataInputStream file) throws IOException {
- this(file.readShort(), file.readShort(), null, -1, null);
+ file.readShort(); // Unused byte_code_offset
+ number_of_locals = file.readShort();
+ types_of_locals = null;
+ types_of_stack_items = null;
types_of_locals = new StackMapType[number_of_locals];
for (int i = 0; i < number_of_locals; i++) {
types_of_locals[i] = new StackMapType(file);
@@ -57,26 +60,4 @@ public final class StackMapEntry impleme
types_of_stack_items[i] = new StackMapType(file);
}
}
-
-
- public StackMapEntry(int byte_code_offset, int number_of_locals,
- StackMapType[] types_of_locals, int number_of_stack_items,
- StackMapType[] types_of_stack_items) {
- this.number_of_locals = number_of_locals;
- this.types_of_locals = types_of_locals;
- this.number_of_stack_items = number_of_stack_items;
- this.types_of_stack_items = types_of_stack_items;
- }
-
-
- /**
- * @return deep copy of this object
- */
- public StackMapEntry copy() {
- try {
- return (StackMapEntry) clone();
- } catch (CloneNotSupportedException e) {
- }
- return null;
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTable.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTable.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTable.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTable.java
Fri Sep 12 12:16:03 2014
@@ -79,19 +79,4 @@ public final class StackMapTable extends
this.map = map;
map_length = (map == null) ? 0 : map.length;
}
-
-
- /**
- * @return deep copy of this attribute
- */
- @Override
- public Attribute copy( ConstantPool _constant_pool ) {
- StackMapTable c = (StackMapTable) clone();
- c.map = new StackMapTableEntry[map_length];
- for (int i = 0; i < map_length; i++) {
- c.map[i] = map[i].copy();
- }
- c.constant_pool = _constant_pool;
- return c;
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java
Fri Sep 12 12:16:03 2014
@@ -101,16 +101,4 @@ public final class StackMapTableEntry im
this.number_of_stack_items = number_of_stack_items;
this.types_of_stack_items = types_of_stack_items;
}
-
-
- /**
- * @return deep copy of this object
- */
- public StackMapTableEntry copy() {
- try {
- return (StackMapTableEntry) clone();
- } catch (CloneNotSupportedException e) {
- }
- return null;
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Synthetic.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Synthetic.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Synthetic.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Synthetic.java
Fri Sep 12 12:16:03 2014
@@ -69,19 +69,4 @@ public final class Synthetic extends Att
System.err.println("Synthetic attribute with length > 0");
}
}
-
-
- /**
- * @return deep copy of this attribute
- */
- @Override
- public Attribute copy( ConstantPool _constant_pool ) {
- Synthetic c = (Synthetic) clone();
- if (bytes != null) {
- c.bytes = new byte[bytes.length];
- System.arraycopy(bytes, 0, c.bytes, 0, bytes.length);
- }
- c.constant_pool = _constant_pool;
- return c;
- }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Unknown.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Unknown.java?rev=1624514&r1=1624513&r2=1624514&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Unknown.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Unknown.java
Fri Sep 12 12:16:03 2014
@@ -90,19 +90,4 @@ public final class Unknown extends Attri
public final String getName() {
return name;
}
-
-
- /**
- * @return deep copy of this attribute
- */
- @Override
- public Attribute copy( ConstantPool _constant_pool ) {
- Unknown c = (Unknown) clone();
- if (bytes != null) {
- c.bytes = new byte[bytes.length];
- System.arraycopy(bytes, 0, c.bytes, 0, bytes.length);
- }
- c.constant_pool = _constant_pool;
- return c;
- }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]