You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2015/08/10 18:28:30 UTC

svn commit: r1695128 - /commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ExceptionTable.java

Author: sebb
Date: Mon Aug 10 16:28:30 2015
New Revision: 1695128

URL: http://svn.apache.org/r1695128
Log:
Don't call overrideable methods from a constructor

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

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ExceptionTable.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ExceptionTable.java?rev=1695128&r1=1695127&r2=1695128&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ExceptionTable.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ExceptionTable.java Mon Aug 10 16:28:30 2015
@@ -39,7 +39,7 @@ public final class ExceptionTable extend
 
     private static final long serialVersionUID = 2045358830660883220L;
 
-    private int[] exception_index_table; // constant pool
+    private int[] exception_index_table; // constant pool // TODO could be final (setter unused)
 
 
     /**
@@ -60,7 +60,7 @@ public final class ExceptionTable extend
     public ExceptionTable(int name_index, int length, int[] exception_index_table,
             ConstantPool constant_pool) {
         super(Constants.ATTR_EXCEPTIONS, name_index, length, constant_pool);
-        setExceptionIndexTable(exception_index_table);
+        this.exception_index_table = exception_index_table != null ? exception_index_table : new int[0];
     }
 
 
@@ -144,7 +144,7 @@ public final class ExceptionTable extend
      * @param exception_index_table the list of exception indexes
      * Also redefines number_of_exceptions according to table length.
      */
-    public final void setExceptionIndexTable( int[] exception_index_table ) {
+    public final void setExceptionIndexTable( int[] exception_index_table ) { // TODO unused
         this.exception_index_table = exception_index_table != null ? exception_index_table : new int[0];
     }