You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2014/09/10 23:18:01 UTC
svn commit: r1624135 -
/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java
Author: markt
Date: Wed Sep 10 21:18:01 2014
New Revision: 1624135
URL: http://svn.apache.org/r1624135
Log:
Simplify. No functional change.
Modified:
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java
Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java?rev=1624135&r1=1624134&r2=1624135&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java Wed Sep 10 21:18:01 2014
@@ -30,7 +30,7 @@ public abstract class Annotations extend
private static final long serialVersionUID = 1L;
- private AnnotationEntry[] annotation_table;
+ private final AnnotationEntry[] annotation_table;
/**
* @param name_index Index pointing to the name <em>Code</em>
@@ -38,8 +38,9 @@ public abstract class Annotations extend
* @param file Input stream
* @param constant_pool Array of constants
*/
- public Annotations(int name_index, int length, DataInputStream file, ConstantPool constant_pool) throws IOException {
- this(name_index, length, (AnnotationEntry[]) null, constant_pool);
+ public Annotations(int name_index, int length, DataInputStream file,
+ ConstantPool constant_pool) throws IOException {
+ super(name_index, length, constant_pool);
final int annotation_table_length = (file.readUnsignedShort());
annotation_table = new AnnotationEntry[annotation_table_length];
for (int i = 0; i < annotation_table_length; i++) {
@@ -49,24 +50,6 @@ public abstract class Annotations extend
/**
- * @param name_index Index pointing to the name <em>Code</em>
- * @param length Content length in bytes
- * @param annotation_table the actual annotations
- * @param constant_pool Array of constants
- */
- public Annotations(int name_index, int length, AnnotationEntry[] annotation_table, ConstantPool constant_pool) {
- super(name_index, length, constant_pool);
- setAnnotationTable(annotation_table);
- }
-
- /**
- * @param annotation_table the entries to set in this annotation
- */
- public final void setAnnotationTable( AnnotationEntry[] annotation_table ) {
- this.annotation_table = annotation_table;
- }
-
- /**
* returns the array of annotation entries in this annotation
*/
public AnnotationEntry[] getAnnotationEntries() {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org