commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1695138 - /commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/InnerClasses.java
Date Mon, 10 Aug 2015 17:25:51 GMT
Author: sebb
Date: Mon Aug 10 17:25:51 2015
New Revision: 1695138

URL: http://svn.apache.org/r1695138
Log:
Inline public setter that is otherwise unused

Modified:
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/InnerClasses.java

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/InnerClasses.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/InnerClasses.java?rev=1695138&r1=1695137&r2=1695138&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/InnerClasses.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/InnerClasses.java
Mon Aug 10 17:25:51 2015
@@ -36,7 +36,7 @@ import org.apache.commons.bcel6.Constant
 public final class InnerClasses extends Attribute {
 
     private static final long serialVersionUID = 4570147726361753700L;
-    private InnerClass[] inner_classes;
+    private InnerClass[] inner_classes; // TODO could be final (setter unused; would need
to recode the copy method)
 
 
     /**
@@ -57,7 +57,7 @@ public final class InnerClasses extends
     public InnerClasses(int name_index, int length, InnerClass[] inner_classes,
             ConstantPool constant_pool) {
         super(Constants.ATTR_INNER_CLASSES, name_index, length, constant_pool);
-        setInnerClasses(inner_classes);
+        this.inner_classes = inner_classes != null ? inner_classes : new InnerClass[0];
     }
 
 
@@ -121,7 +121,7 @@ public final class InnerClasses extends
     /**
      * @param inner_classes the array of inner classes
      */
-    public final void setInnerClasses( InnerClass[] inner_classes ) {
+    public final void setInnerClasses( InnerClass[] inner_classes ) { // TODO unused
         this.inner_classes = inner_classes != null ? inner_classes : new InnerClass[0];
     }
 
@@ -144,6 +144,7 @@ public final class InnerClasses extends
      */
     @Override
     public Attribute copy( ConstantPool _constant_pool ) {
+        // TODO this could be recoded to use a lower level constructor after creating a copy
of the inner classes
         InnerClasses c = (InnerClasses) clone();
         c.inner_classes = new InnerClass[inner_classes.length];
         for (int i = 0; i < inner_classes.length; i++) {



Mime
View raw message