You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2014/09/27 17:16:25 UTC
svn commit: r1627977 - in
/commons/proper/bcel/trunk/src/main/java/org/apache/bcel: classfile/
generic/ util/ verifier/ verifier/statics/ verifier/structurals/
Author: ggregory
Date: Sat Sep 27 15:16:23 2014
New Revision: 1627977
URL: http://svn.apache.org/r1627977
Log:
Add final modifier to private fields.
Modified:
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/AnnotationElementValue.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ArrayElementValue.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ClassParser.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/DescendingVisitor.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ElementValuePair.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/EnumElementValue.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ParameterAnnotationEntry.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/StackMapTableEntry.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Unknown.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationElementValueGen.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationEntryGen.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ArrayElementValueGen.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ClassGen.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ConstantPoolGen.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ElementValuePairGen.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/FieldGenOrMethodGen.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/MethodGen.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/TargetLostException.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/AttributeHTML.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/BCELifier.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ByteSequence.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/Class2HTML.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassLoader.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassLoaderRepository.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassSet.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassStack.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/CodeHTML.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ConstantHTML.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/InstructionFinder.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/JavaWrapper.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/MethodHTML.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/SyntheticRepository.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/PassVerifier.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/VerificationResult.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/Verifier.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/VerifierAppFrame.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/VerifierFactoryListModel.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/IntList.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/LocalVariableInfo.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/LocalVariablesInfo.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass1Verifier.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/StringRepresentation.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ControlFlowGraph.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ExceptionHandler.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ExceptionHandlers.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Frame.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/OperandStack.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Pass3bVerifier.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java
commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/UninitializedObjectType.java
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/AnnotationElementValue.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/AnnotationElementValue.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/AnnotationElementValue.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/AnnotationElementValue.java Sat Sep 27 15:16:23 2014
@@ -23,7 +23,7 @@ import java.io.IOException;
public class AnnotationElementValue extends ElementValue
{
// For annotation element values, this is the annotation
- private AnnotationEntry annotationEntry;
+ private final AnnotationEntry annotationEntry;
public AnnotationElementValue(int type, AnnotationEntry annotationEntry,
ConstantPool cpool)
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ArrayElementValue.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ArrayElementValue.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ArrayElementValue.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ArrayElementValue.java Sat Sep 27 15:16:23 2014
@@ -23,7 +23,7 @@ import java.io.IOException;
public class ArrayElementValue extends ElementValue
{
// For array types, this is the array
- private ElementValue[] evalues;
+ private final ElementValue[] evalues;
@Override
public String toString()
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ClassParser.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ClassParser.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ClassParser.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ClassParser.java Sat Sep 27 15:16:23 2014
@@ -56,7 +56,7 @@ public final class ClassParser {
private Field[] fields; // class fields, i.e., its variables
private Method[] methods; // methods defined in the class
private Attribute[] attributes; // attributes defined in the class
- private boolean is_zip; // Loaded from zip file
+ private final boolean is_zip; // Loaded from zip file
private static final int BUFSIZE = 8192;
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/DescendingVisitor.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/DescendingVisitor.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/DescendingVisitor.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/DescendingVisitor.java Sat Sep 27 15:16:23 2014
@@ -29,11 +29,11 @@ import java.util.Stack;
*/
public class DescendingVisitor implements Visitor
{
- private JavaClass clazz;
+ private final JavaClass clazz;
- private Visitor visitor;
+ private final Visitor visitor;
- private Stack<Object> stack = new Stack<Object>();
+ private final Stack<Object> stack = new Stack<Object>();
/**
* @return container of current entitity, i.e., predecessor during traversal
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ElementValuePair.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ElementValuePair.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ElementValuePair.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ElementValuePair.java Sat Sep 27 15:16:23 2014
@@ -30,11 +30,11 @@ import org.apache.bcel.Constants;
*/
public class ElementValuePair
{
- private ElementValue elementValue;
+ private final ElementValue elementValue;
- private ConstantPool constantPool;
+ private final ConstantPool constantPool;
- private int elementNameIndex;
+ private final int elementNameIndex;
public ElementValuePair(int elementNameIndex, ElementValue elementValue,
ConstantPool constantPool)
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/EnumElementValue.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/EnumElementValue.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/EnumElementValue.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/EnumElementValue.java Sat Sep 27 15:16:23 2014
@@ -24,9 +24,9 @@ import org.apache.bcel.Constants;
public class EnumElementValue extends ElementValue
{
// For enum types, these two indices point to the type and value
- private int typeIdx;
+ private final int typeIdx;
- private int valueIdx;
+ private final int valueIdx;
public EnumElementValue(int type, int typeIdx, int valueIdx,
ConstantPool cpool)
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ParameterAnnotationEntry.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ParameterAnnotationEntry.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ParameterAnnotationEntry.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ParameterAnnotationEntry.java Sat Sep 27 15:16:23 2014
@@ -35,8 +35,8 @@ import org.apache.bcel.Constants;
*/
public class ParameterAnnotationEntry implements Node, Constants {
- private int annotation_table_length;
- private AnnotationEntry[] annotation_table;
+ private final int annotation_table_length;
+ private final AnnotationEntry[] annotation_table;
/**
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/StackMapTableEntry.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/StackMapTableEntry.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/StackMapTableEntry.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/StackMapTableEntry.java Sat Sep 27 15:16:23 2014
@@ -38,7 +38,7 @@ public final class StackMapTableEntry im
private static final long serialVersionUID = 1L;
- private int frame_type;
+ private final int frame_type;
private int byte_code_offset_delta;
private int number_of_locals;
private StackMapType[] types_of_locals;
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Unknown.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Unknown.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Unknown.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Unknown.java Sat Sep 27 15:16:23 2014
@@ -42,7 +42,7 @@ public final class Unknown extends Attri
private static final long serialVersionUID = -4099655108069755015L;
private byte[] bytes;
- private String name;
+ private final String name;
private static final Map<String, Unknown> unknown_attributes = new HashMap<String, Unknown>();
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationElementValueGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationElementValueGen.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationElementValueGen.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationElementValueGen.java Sat Sep 27 15:16:23 2014
@@ -25,7 +25,7 @@ import org.apache.bcel.classfile.Element
public class AnnotationElementValueGen extends ElementValueGen
{
// For annotation element values, this is the annotation
- private AnnotationEntryGen a;
+ private final AnnotationEntryGen a;
public AnnotationElementValueGen(AnnotationEntryGen a, ConstantPoolGen cpool)
{
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationEntryGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationEntryGen.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationEntryGen.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationEntryGen.java Sat Sep 27 15:16:23 2014
@@ -34,7 +34,7 @@ public class AnnotationEntryGen
private List<ElementValuePairGen> evs;
- private ConstantPoolGen cpool;
+ private final ConstantPoolGen cpool;
private boolean isRuntimeVisible = false;
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ArrayElementValueGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ArrayElementValueGen.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ArrayElementValueGen.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ArrayElementValueGen.java Sat Sep 27 15:16:23 2014
@@ -29,7 +29,7 @@ public class ArrayElementValueGen extend
{
// J5TODO: Should we make this an array or a list? A list would be easier to
// modify ...
- private List<ElementValueGen> evalues;
+ private final List<ElementValueGen> evalues;
public ArrayElementValueGen(ConstantPoolGen cp)
{
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ClassGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ClassGen.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ClassGen.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ClassGen.java Sat Sep 27 15:16:23 2014
@@ -48,16 +48,17 @@ public class ClassGen extends AccessFlag
private static final long serialVersionUID = 6880879387392827211L;
/* Corresponds to the fields found in a JavaClass object.
*/
- private String class_name, super_class_name, file_name;
+ private String class_name, super_class_name;
+ private final String file_name;
private int class_name_index = -1, superclass_name_index = -1;
private int major = Constants.MAJOR_1_1, minor = Constants.MINOR_1_1;
private ConstantPoolGen cp; // Template for building up constant pool
// ArrayLists instead of arrays to gather fields, methods, etc.
- private List<Field> field_vec = new ArrayList<Field>();
- private List<Method> method_vec = new ArrayList<Method>();
- private List<Attribute> attribute_vec = new ArrayList<Attribute>();
- private List<String> interface_vec = new ArrayList<String>();
- private List<AnnotationEntryGen> annotation_vec = new ArrayList<AnnotationEntryGen>();
+ private final List<Field> field_vec = new ArrayList<Field>();
+ private final List<Method> method_vec = new ArrayList<Method>();
+ private final List<Attribute> attribute_vec = new ArrayList<Attribute>();
+ private final List<String> interface_vec = new ArrayList<String>();
+ private final List<AnnotationEntryGen> annotation_vec = new ArrayList<AnnotationEntryGen>();
private static BCELComparator _cmp = new BCELComparator() {
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ConstantPoolGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ConstantPoolGen.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ConstantPoolGen.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ConstantPoolGen.java Sat Sep 27 15:16:23 2014
@@ -186,7 +186,7 @@ public class ConstantPoolGen implements
}
}
- private Map<String, Index> string_table = new HashMap<String, Index>();
+ private final Map<String, Index> string_table = new HashMap<String, Index>();
/**
@@ -223,7 +223,7 @@ public class ConstantPoolGen implements
return ret;
}
- private Map<String, Index> class_table = new HashMap<String, Index>();
+ private final Map<String, Index> class_table = new HashMap<String, Index>();
/**
@@ -362,7 +362,7 @@ public class ConstantPoolGen implements
return ret;
}
- private Map<String, Index> utf8_table = new HashMap<String, Index>();
+ private final Map<String, Index> utf8_table = new HashMap<String, Index>();
/**
@@ -474,7 +474,7 @@ public class ConstantPoolGen implements
return ret;
}
- private Map<String, Index> n_a_t_table = new HashMap<String, Index>();
+ private final Map<String, Index> n_a_t_table = new HashMap<String, Index>();
/**
@@ -516,7 +516,7 @@ public class ConstantPoolGen implements
return ret;
}
- private Map<String, Index> cp_table = new HashMap<String, Index>();
+ private final Map<String, Index> cp_table = new HashMap<String, Index>();
/**
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ElementValuePairGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ElementValuePairGen.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ElementValuePairGen.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ElementValuePairGen.java Sat Sep 27 15:16:23 2014
@@ -27,9 +27,9 @@ public class ElementValuePairGen
{
private int nameIdx;
- private ElementValueGen value;
+ private final ElementValueGen value;
- private ConstantPoolGen cpool;
+ private final ConstantPoolGen cpool;
public ElementValuePairGen(ElementValuePair nvp, ConstantPoolGen cpool,
boolean copyPoolEntries)
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/FieldGenOrMethodGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/FieldGenOrMethodGen.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/FieldGenOrMethodGen.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/FieldGenOrMethodGen.java Sat Sep 27 15:16:23 2014
@@ -37,7 +37,7 @@ public abstract class FieldGenOrMethodGe
protected String name;
protected Type type;
protected ConstantPoolGen cp;
- private List<Attribute> attribute_vec = new ArrayList<Attribute>();
+ private final List<Attribute> attribute_vec = new ArrayList<Attribute>();
protected List<AnnotationEntryGen> annotation_vec= new ArrayList<AnnotationEntryGen>();
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/MethodGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/MethodGen.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/MethodGen.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/MethodGen.java Sat Sep 27 15:16:23 2014
@@ -69,11 +69,11 @@ public class MethodGen extends FieldGenO
private int max_stack;
private InstructionList il;
private boolean strip_attributes;
- private List<LocalVariableGen> variable_vec = new ArrayList<LocalVariableGen>();
- private List<LineNumberGen> line_number_vec = new ArrayList<LineNumberGen>();
- private List<CodeExceptionGen> exception_vec = new ArrayList<CodeExceptionGen>();
- private List<String> throws_vec = new ArrayList<String>();
- private List<Attribute> code_attrs_vec = new ArrayList<Attribute>();
+ private final List<LocalVariableGen> variable_vec = new ArrayList<LocalVariableGen>();
+ private final List<LineNumberGen> line_number_vec = new ArrayList<LineNumberGen>();
+ private final List<CodeExceptionGen> exception_vec = new ArrayList<CodeExceptionGen>();
+ private final List<String> throws_vec = new ArrayList<String>();
+ private final List<Attribute> code_attrs_vec = new ArrayList<Attribute>();
private List<AnnotationEntryGen>[] param_annotations; // Array of lists containing AnnotationGen objects
private boolean hasParameterAnnotations = false;
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/TargetLostException.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/TargetLostException.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/TargetLostException.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/TargetLostException.java Sat Sep 27 15:16:23 2014
@@ -51,7 +51,7 @@ package org.apache.bcel.generic;
public final class TargetLostException extends Exception {
private static final long serialVersionUID = -6857272667645328384L;
- private InstructionHandle[] targets;
+ private final InstructionHandle[] targets;
TargetLostException(InstructionHandle[] t, String mesg) {
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/AttributeHTML.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/AttributeHTML.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/AttributeHTML.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/AttributeHTML.java Sat Sep 27 15:16:23 2014
@@ -45,11 +45,11 @@ import org.apache.bcel.classfile.Utility
*/
final class AttributeHTML implements org.apache.bcel.Constants {
- private String class_name; // name of current class
- private PrintWriter file; // file to write to
+ private final String class_name; // name of current class
+ private final PrintWriter file; // file to write to
private int attr_count = 0;
- private ConstantHTML constant_html;
- private ConstantPool constant_pool;
+ private final ConstantHTML constant_html;
+ private final ConstantPool constant_pool;
AttributeHTML(String dir, String class_name, ConstantPool constant_pool,
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/BCELifier.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/BCELifier.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/BCELifier.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/BCELifier.java Sat Sep 27 15:16:23 2014
@@ -48,9 +48,9 @@ public class BCELifier extends org.apach
private static final int FLAG_FOR_UNKNOWN = -1;
private static final int FLAG_FOR_CLASS = 0;
private static final int FLAG_FOR_METHOD = 1;
- private JavaClass _clazz;
- private PrintWriter _out;
- private ConstantPoolGen _cp;
+ private final JavaClass _clazz;
+ private final PrintWriter _out;
+ private final ConstantPoolGen _cp;
/** @param clazz Java class to "decompile"
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ByteSequence.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ByteSequence.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ByteSequence.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ByteSequence.java Sat Sep 27 15:16:23 2014
@@ -30,7 +30,7 @@ import java.io.DataInputStream;
*/
public final class ByteSequence extends DataInputStream {
- private ByteArrayStream byteStream;
+ private final ByteArrayStream byteStream;
public ByteSequence(byte[] bytes) {
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/Class2HTML.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/Class2HTML.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/Class2HTML.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/Class2HTML.java Sat Sep 27 15:16:23 2014
@@ -53,8 +53,8 @@ import org.apache.bcel.classfile.Utility
*/
public class Class2HTML implements Constants {
- private JavaClass java_class; // current class object
- private String dir;
+ private final JavaClass java_class; // current class object
+ private final String dir;
private static String class_package; // name of package, unclean to make it static, but ...
private static String class_name; // name of current class, dito
private static ConstantPool constant_pool;
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassLoader.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassLoader.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassLoader.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassLoader.java Sat Sep 27 15:16:23 2014
@@ -57,8 +57,8 @@ public class ClassLoader extends java.la
public static final String[] DEFAULT_IGNORED_PACKAGES = {
"java.", "javax.", "sun."
};
- private Hashtable<String, Class<?>> classes = new Hashtable<String, Class<?>>(); // Hashtable is synchronized thus thread-safe
- private String[] ignored_packages;
+ private final Hashtable<String, Class<?>> classes = new Hashtable<String, Class<?>>(); // Hashtable is synchronized thus thread-safe
+ private final String[] ignored_packages;
private Repository repository = SyntheticRepository.getInstance();
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassLoaderRepository.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassLoaderRepository.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassLoaderRepository.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassLoaderRepository.java Sat Sep 27 15:16:23 2014
@@ -40,8 +40,8 @@ import org.apache.bcel.classfile.JavaCla
public class ClassLoaderRepository implements Repository {
private static final long serialVersionUID = -1052781833503868187L;
- private java.lang.ClassLoader loader;
- private Map<String, JavaClass> loadedClasses = new HashMap<String, JavaClass>(); // CLASSNAME X JAVACLASS
+ private final java.lang.ClassLoader loader;
+ private final Map<String, JavaClass> loadedClasses = new HashMap<String, JavaClass>(); // CLASSNAME X JAVACLASS
public ClassLoaderRepository(java.lang.ClassLoader loader) {
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java Sat Sep 27 15:16:23 2014
@@ -55,8 +55,8 @@ public class ClassPath implements Serial
}
};
- private PathEntry[] paths;
- private String class_path;
+ private final PathEntry[] paths;
+ private final String class_path;
private ClassPath parent;
public ClassPath(ClassPath parent, String class_path) {
@@ -401,7 +401,7 @@ public class ClassPath implements Serial
private static class Dir extends PathEntry {
private static final long serialVersionUID = 4374062802142373088L;
- private String dir;
+ private final String dir;
Dir(String d) {
@@ -476,7 +476,7 @@ public class ClassPath implements Serial
private static class Zip extends PathEntry {
private static final long serialVersionUID = -2210747632897905532L;
- private ZipFile zip;
+ private final ZipFile zip;
Zip(ZipFile z) {
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassSet.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassSet.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassSet.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassSet.java Sat Sep 27 15:16:23 2014
@@ -34,7 +34,7 @@ import org.apache.bcel.classfile.JavaCla
public class ClassSet implements java.io.Serializable {
private static final long serialVersionUID = -7476907380350035254L;
- private Map<String, JavaClass> _map = new HashMap<String, JavaClass>();
+ private final Map<String, JavaClass> _map = new HashMap<String, JavaClass>();
public boolean add( JavaClass clazz ) {
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassStack.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassStack.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassStack.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassStack.java Sat Sep 27 15:16:23 2014
@@ -30,7 +30,7 @@ import org.apache.bcel.classfile.JavaCla
public class ClassStack implements java.io.Serializable {
private static final long serialVersionUID = 6126079269396985982L;
- private Stack<JavaClass> stack = new Stack<JavaClass>();
+ private final Stack<JavaClass> stack = new Stack<JavaClass>();
public void push( JavaClass clazz ) {
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/CodeHTML.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/CodeHTML.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/CodeHTML.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/CodeHTML.java Sat Sep 27 15:16:23 2014
@@ -43,12 +43,12 @@ import org.apache.bcel.classfile.Utility
*/
final class CodeHTML implements org.apache.bcel.Constants {
- private String class_name; // name of current class
+ private final String class_name; // name of current class
// private Method[] methods; // Methods to print
- private PrintWriter file; // file to write to
+ private final PrintWriter file; // file to write to
private BitSet goto_set;
- private ConstantPool constant_pool;
- private ConstantHTML constant_html;
+ private final ConstantPool constant_pool;
+ private final ConstantHTML constant_html;
private static boolean wide = false;
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ConstantHTML.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ConstantHTML.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ConstantHTML.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ConstantHTML.java Sat Sep 27 15:16:23 2014
@@ -40,13 +40,13 @@ import org.apache.bcel.classfile.Utility
*/
final class ConstantHTML implements org.apache.bcel.Constants {
- private String class_name; // name of current class
- private String class_package; // name of package
- private ConstantPool constant_pool; // reference to constant pool
- private PrintWriter file; // file to write to
- private String[] constant_ref; // String to return for cp[i]
- private Constant[] constants; // The constants in the cp
- private Method[] methods;
+ private final String class_name; // name of current class
+ private final String class_package; // name of package
+ private final ConstantPool constant_pool; // reference to constant pool
+ private final PrintWriter file; // file to write to
+ private final String[] constant_ref; // String to return for cp[i]
+ private final Constant[] constants; // The constants in the cp
+ private final Method[] methods;
ConstantHTML(String dir, String class_name, String class_package, Method[] methods,
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/InstructionFinder.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/InstructionFinder.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/InstructionFinder.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/InstructionFinder.java Sat Sep 27 15:16:23 2014
@@ -74,7 +74,7 @@ public class InstructionFinder {
private static final int NO_OPCODES = 256; // Potential number,
// some are not used
private static final Map<String, String> map = new HashMap<String, String>();
- private InstructionList il;
+ private final InstructionList il;
private String il_string; // instruction list
// as string
private InstructionHandle[] handles; // map instruction
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/JavaWrapper.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/JavaWrapper.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/JavaWrapper.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/JavaWrapper.java Sat Sep 27 15:16:23 2014
@@ -38,7 +38,7 @@ import java.lang.reflect.Modifier;
*/
public class JavaWrapper {
- private java.lang.ClassLoader loader;
+ private final java.lang.ClassLoader loader;
private static java.lang.ClassLoader getClassLoader() {
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/MethodHTML.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/MethodHTML.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/MethodHTML.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/MethodHTML.java Sat Sep 27 15:16:23 2014
@@ -37,10 +37,10 @@ import org.apache.bcel.classfile.Utility
*/
final class MethodHTML implements org.apache.bcel.Constants {
- private String class_name; // name of current class
- private PrintWriter file; // file to write to
- private ConstantHTML constant_html;
- private AttributeHTML attribute_html;
+ private final String class_name; // name of current class
+ private final PrintWriter file; // file to write to
+ private final ConstantHTML constant_html;
+ private final AttributeHTML attribute_html;
MethodHTML(String dir, String class_name, Method[] methods, Field[] fields,
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/SyntheticRepository.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/SyntheticRepository.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/SyntheticRepository.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/SyntheticRepository.java Sat Sep 27 15:16:23 2014
@@ -47,7 +47,7 @@ public class SyntheticRepository impleme
//private static final String DEFAULT_PATH = ClassPath.getClassPath();
private static final Map<ClassPath, SyntheticRepository> _instances = new HashMap<ClassPath, SyntheticRepository>(); // CLASSPATH X REPOSITORY
private ClassPath _path = null;
- private Map<String, SoftReference<JavaClass>> _loadedClasses = new HashMap<String, SoftReference<JavaClass>>(); // CLASSNAME X JAVACLASS
+ private final Map<String, SoftReference<JavaClass>> _loadedClasses = new HashMap<String, SoftReference<JavaClass>>(); // CLASSNAME X JAVACLASS
private SyntheticRepository(ClassPath path) {
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/PassVerifier.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/PassVerifier.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/PassVerifier.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/PassVerifier.java Sat Sep 27 15:16:23 2014
@@ -49,7 +49,7 @@ import java.util.List;
public abstract class PassVerifier {
/** The (warning) messages. */
- private List<String> messages = new ArrayList<String>();
+ private final List<String> messages = new ArrayList<String>();
/** The VerificationResult cache. */
private VerificationResult verificationResult = null;
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/VerificationResult.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/VerificationResult.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/VerificationResult.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/VerificationResult.java Sat Sep 27 15:16:23 2014
@@ -57,10 +57,10 @@ public class VerificationResult {
public static final VerificationResult VR_OK = new VerificationResult(VERIFIED_OK, VERIFIED_OK_MSG);
/** The numeric status. */
- private int numeric;
+ private final int numeric;
/** The detailed message. */
- private String detailMessage;
+ private final String detailMessage;
/** The usual constructor. */
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/Verifier.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/Verifier.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/Verifier.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/Verifier.java Sat Sep 27 15:16:23 2014
@@ -55,9 +55,9 @@ public class Verifier {
/** A Pass2Verifier for this Verifier instance. */
private Pass2Verifier p2v;
/** The Pass3aVerifiers for this Verifier instance. Key: Interned string specifying the method number. */
- private Map<String, Pass3aVerifier> p3avs = new HashMap<String, Pass3aVerifier>();
+ private final Map<String, Pass3aVerifier> p3avs = new HashMap<String, Pass3aVerifier>();
/** The Pass3bVerifiers for this Verifier instance. Key: Interned string specifying the method number. */
- private Map<String, Pass3bVerifier> p3bvs = new HashMap<String, Pass3bVerifier>();
+ private final Map<String, Pass3bVerifier> p3bvs = new HashMap<String, Pass3bVerifier>();
/** Returns the VerificationResult for the given pass. */
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/VerifierAppFrame.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/VerifierAppFrame.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/VerifierAppFrame.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/VerifierAppFrame.java Sat Sep 27 15:16:23 2014
@@ -70,7 +70,7 @@ public class VerifierAppFrame extends JF
GridLayout gridLayout4 = new GridLayout();
JScrollPane jScrollPane4 = new JScrollPane();
CardLayout cardLayout1 = new CardLayout();
- private String JUSTICE_VERSION = "JustIce by Enver Haase";
+ private final String JUSTICE_VERSION = "JustIce by Enver Haase";
private String current_class;
GridLayout gridLayout3 = new GridLayout();
JTextPane pass1TextPane = new JTextPane();
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/VerifierFactoryListModel.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/VerifierFactoryListModel.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/VerifierFactoryListModel.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/VerifierFactoryListModel.java Sat Sep 27 15:16:23 2014
@@ -35,8 +35,8 @@ import javax.swing.event.ListDataListene
public class VerifierFactoryListModel implements org.apache.bcel.verifier.VerifierFactoryObserver,
javax.swing.ListModel {
- private List<ListDataListener> listeners = new ArrayList<ListDataListener>();
- private Set<String> cache = new TreeSet<String>();
+ private final List<ListDataListener> listeners = new ArrayList<ListDataListener>();
+ private final Set<String> cache = new TreeSet<String>();
public VerifierFactoryListModel() {
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/IntList.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/IntList.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/IntList.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/IntList.java Sat Sep 27 15:16:23 2014
@@ -29,7 +29,7 @@ import java.util.List;
*/
public class IntList{
/** The int are stored as Integer objects here. */
- private List<Integer> theList;
+ private final List<Integer> theList;
/** This constructor creates an empty list. */
IntList(){
theList = new ArrayList<Integer>();
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/LocalVariableInfo.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/LocalVariableInfo.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/LocalVariableInfo.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/LocalVariableInfo.java Sat Sep 27 15:16:23 2014
@@ -34,9 +34,9 @@ import org.apache.bcel.verifier.exc.Loca
public class LocalVariableInfo{
/** The types database. KEY: String representing the offset integer. */
- private Hashtable<String, Type> types = new Hashtable<String, Type>();
+ private final Hashtable<String, Type> types = new Hashtable<String, Type>();
/** The names database. KEY: String representing the offset integer. */
- private Hashtable<String, String> names = new Hashtable<String, String>();
+ private final Hashtable<String, String> names = new Hashtable<String, String>();
/**
* Adds a name of a local variable and a certain slot to our 'names'
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/LocalVariablesInfo.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/LocalVariablesInfo.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/LocalVariablesInfo.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/LocalVariablesInfo.java Sat Sep 27 15:16:23 2014
@@ -33,7 +33,7 @@ import org.apache.bcel.verifier.exc.Loca
public class LocalVariablesInfo{
/** The information about the local variables is stored here. */
- private LocalVariableInfo[] localVariableInfos;
+ private final LocalVariableInfo[] localVariableInfos;
/** The constructor. */
LocalVariablesInfo(int max_locals){
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass1Verifier.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass1Verifier.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass1Verifier.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass1Verifier.java Sat Sep 27 15:16:23 2014
@@ -47,7 +47,7 @@ public final class Pass1Verifier extends
/**
* The Verifier that created this.
*/
- private Verifier myOwner;
+ private final Verifier myOwner;
/** Used to load in and return the myOwner-matching JavaClass object when needed. Avoids loading in a class file when it's not really needed! */
private JavaClass getJavaClass(){
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java Sat Sep 27 15:16:23 2014
@@ -93,7 +93,7 @@ public final class Pass2Verifier extends
private LocalVariablesInfo[] localVariablesInfos;
/** The Verifier that created this. */
- private Verifier myOwner;
+ private final Verifier myOwner;
/**
* Should only be instantiated by a Verifier.
@@ -307,28 +307,28 @@ public final class Pass2Verifier extends
* @see #constant_pool_entries_satisfy_static_constraints()
*/
private class CPESSC_Visitor extends org.apache.bcel.classfile.EmptyVisitor{
- private Class<?> CONST_Class;
+ private final Class<?> CONST_Class;
/*
private Class<?> CONST_Fieldref;
private Class<?> CONST_Methodref;
private Class<?> CONST_InterfaceMethodref;
*/
- private Class<?> CONST_String;
- private Class<?> CONST_Integer;
- private Class<?> CONST_Float;
- private Class<?> CONST_Long;
- private Class<?> CONST_Double;
- private Class<?> CONST_NameAndType;
- private Class<?> CONST_Utf8;
+ private final Class<?> CONST_String;
+ private final Class<?> CONST_Integer;
+ private final Class<?> CONST_Float;
+ private final Class<?> CONST_Long;
+ private final Class<?> CONST_Double;
+ private final Class<?> CONST_NameAndType;
+ private final Class<?> CONST_Utf8;
private final JavaClass jc;
private final ConstantPool cp; // ==jc.getConstantPool() -- only here to save typing work and computing power.
private final int cplen; // == cp.getLength() -- to save computing power.
- private DescendingVisitor carrier;
+ private final DescendingVisitor carrier;
- private Set<String> field_names = new HashSet<String>();
- private Set<String> field_names_and_desc = new HashSet<String>();
- private Set<String> method_names_and_desc = new HashSet<String>();
+ private final Set<String> field_names = new HashSet<String>();
+ private final Set<String> field_names_and_desc = new HashSet<String>();
+ private final Set<String> method_names_and_desc = new HashSet<String>();
private CPESSC_Visitor(JavaClass _jc){
jc = _jc;
@@ -1442,8 +1442,8 @@ public final class Pass2Verifier extends
*/
private static class InnerClassDetector extends EmptyVisitor{
private boolean hasInnerClass = false;
- private JavaClass jc;
- private ConstantPool cp;
+ private final JavaClass jc;
+ private final ConstantPool cp;
/** Constructs an InnerClassDetector working on the JavaClass _jc. */
public InnerClassDetector(JavaClass _jc){
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java Sat Sep 27 15:16:23 2014
@@ -112,14 +112,14 @@ import org.apache.bcel.verifier.exc.Stat
public final class Pass3aVerifier extends PassVerifier{
/** The Verifier that created this. */
- private Verifier myOwner;
+ private final Verifier myOwner;
/**
* The method number to verify.
* This is the index in the array returned
* by JavaClass.getMethods().
*/
- private int method_no;
+ private final int method_no;
/** The one and only InstructionList object used by an instance of this class. It's here for performance reasons by do_verify() and its callees. */
InstructionList instructionList;
@@ -444,7 +444,7 @@ public final class Pass3aVerifier extend
*/
private class InstOperandConstraintVisitor extends org.apache.bcel.generic.EmptyVisitor{
/** The ConstantPoolGen instance this Visitor operates on. */
- private ConstantPoolGen cpg;
+ private final ConstantPoolGen cpg;
/** The only Constructor. */
InstOperandConstraintVisitor(ConstantPoolGen cpg){
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/StringRepresentation.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/StringRepresentation.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/StringRepresentation.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/StringRepresentation.java Sat Sep 27 15:16:23 2014
@@ -77,7 +77,7 @@ public class StringRepresentation extend
/** The string representation, created by a visitXXX() method, output by toString(). */
private String tostring;
/** The node we ask for its string representation. Not really needed; only for debug output. */
- private Node n;
+ private final Node n;
/**
* Creates a new StringRepresentation object which is the representation of n.
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ControlFlowGraph.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ControlFlowGraph.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ControlFlowGraph.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ControlFlowGraph.java Sat Sep 27 15:16:23 2014
@@ -62,17 +62,17 @@ public class ControlFlowGraph{
/**
* The InstructionHandle this InstructionContext is wrapped around.
*/
- private InstructionHandle instruction;
+ private final InstructionHandle instruction;
/**
* The 'incoming' execution Frames.
*/
- private Map<InstructionContext, Frame> inFrames; // key: the last-executed JSR
+ private final Map<InstructionContext, Frame> inFrames; // key: the last-executed JSR
/**
* The 'outgoing' execution Frames.
*/
- private Map<InstructionContext, Frame> outFrames; // key: the last-executed JSR
+ private final Map<InstructionContext, Frame> outFrames; // key: the last-executed JSR
/**
* The 'execution predecessors' - a list of type InstructionContext
@@ -395,7 +395,7 @@ public class ControlFlowGraph{
private final ExceptionHandlers exceptionhandlers;
/** All InstructionContext instances of this ControlFlowGraph. */
- private Map<InstructionHandle, InstructionContext> instructionContexts = new HashMap<InstructionHandle, InstructionContext>(); //keys: InstructionHandle, values: InstructionContextImpl
+ private final Map<InstructionHandle, InstructionContext> instructionContexts = new HashMap<InstructionHandle, InstructionContext>(); //keys: InstructionHandle, values: InstructionContextImpl
/**
* A Control Flow Graph.
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ExceptionHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ExceptionHandler.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ExceptionHandler.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ExceptionHandler.java Sat Sep 27 15:16:23 2014
@@ -31,10 +31,10 @@ import org.apache.bcel.generic.ObjectTyp
*/
public class ExceptionHandler{
/** The type of the exception to catch. NULL means ANY. */
- private ObjectType catchtype;
+ private final ObjectType catchtype;
/** The InstructionHandle where the handling begins. */
- private InstructionHandle handlerpc;
+ private final InstructionHandle handlerpc;
/** Leave instance creation to JustIce. */
ExceptionHandler(ObjectType catch_type, InstructionHandle handler_pc){
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ExceptionHandlers.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ExceptionHandlers.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ExceptionHandlers.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ExceptionHandlers.java Sat Sep 27 15:16:23 2014
@@ -38,7 +38,7 @@ public class ExceptionHandlers{
* The ExceptionHandler instances.
* Key: InstructionHandle objects, Values: HashSet<ExceptionHandler> instances.
*/
- private Map<InstructionHandle, Set<ExceptionHandler>> exceptionhandlers;
+ private final Map<InstructionHandle, Set<ExceptionHandler>> exceptionhandlers;
/**
* Constructor. Creates a new ExceptionHandlers instance.
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Frame.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Frame.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Frame.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Frame.java Sat Sep 27 15:16:23 2014
@@ -40,12 +40,12 @@ public class Frame{
/**
*
*/
- private LocalVariables locals;
+ private final LocalVariables locals;
/**
*
*/
- private OperandStack stack;
+ private final OperandStack stack;
/**
*
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java Sat Sep 27 15:16:23 2014
@@ -32,7 +32,7 @@ import org.apache.bcel.verifier.exc.Stru
*/
public class LocalVariables{
/** The Type[] containing the local variable slots. */
- private Type[] locals;
+ private final Type[] locals;
/**
* Creates a new LocalVariables object.
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/OperandStack.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/OperandStack.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/OperandStack.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/OperandStack.java Sat Sep 27 15:16:23 2014
@@ -39,7 +39,7 @@ public class OperandStack{
private ArrayList<Type> stack = new ArrayList<Type>();
/** The maximum number of stack slots this OperandStack instance may hold. */
- private int maxStack;
+ private final int maxStack;
/**
* Creates an empty stack with a maximum of maxStack slots.
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Pass3bVerifier.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Pass3bVerifier.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Pass3bVerifier.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Pass3bVerifier.java Sat Sep 27 15:16:23 2014
@@ -79,8 +79,8 @@ public final class Pass3bVerifier extend
* we have about its symbolic execution predecessors.
*/
private static final class InstructionContextQueue{
- private List<InstructionContext> ics = new Vector<InstructionContext>();
- private List<ArrayList<InstructionContext>> ecs = new Vector<ArrayList<InstructionContext>>();
+ private final List<InstructionContext> ics = new Vector<InstructionContext>();
+ private final List<ArrayList<InstructionContext>> ecs = new Vector<ArrayList<InstructionContext>>();
public void add(InstructionContext ic, ArrayList<InstructionContext> executionChain){
ics.add(ic);
ecs.add(executionChain);
@@ -107,10 +107,10 @@ public final class Pass3bVerifier extend
private static final boolean DEBUG = true;
/** The Verifier that created this. */
- private Verifier myOwner;
+ private final Verifier myOwner;
/** The method number to verify. */
- private int method_no;
+ private final int method_no;
/**
* This class should only be instantiated by a Verifier.
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java Sat Sep 27 15:16:23 2014
@@ -86,7 +86,7 @@ public class Subroutines{
private int localVariable = UNSET;
/** The instructions that belong to this subroutine. */
- private Set<InstructionHandle> instructions = new HashSet<InstructionHandle>(); // Elements: InstructionHandle
+ private final Set<InstructionHandle> instructions = new HashSet<InstructionHandle>(); // Elements: InstructionHandle
/*
* Refer to the Subroutine interface for documentation.
@@ -99,7 +99,7 @@ public class Subroutines{
* The JSR or JSR_W instructions that define this
* subroutine by targeting it.
*/
- private Set<InstructionHandle> theJSRs = new HashSet<InstructionHandle>();
+ private final Set<InstructionHandle> theJSRs = new HashSet<InstructionHandle>();
/**
* The RET instruction that leaves this subroutine.
@@ -345,7 +345,7 @@ public class Subroutines{
* Key: InstructionHandle of the leader of the subroutine.
* Elements: SubroutineImpl objects.
*/
- private Map<InstructionHandle, Subroutine> subroutines = new HashMap<InstructionHandle, Subroutine>();
+ private final Map<InstructionHandle, Subroutine> subroutines = new HashMap<InstructionHandle, Subroutine>();
/**
* This is referring to a special subroutine, namely the
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/UninitializedObjectType.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/UninitializedObjectType.java?rev=1627977&r1=1627976&r2=1627977&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/UninitializedObjectType.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/UninitializedObjectType.java Sat Sep 27 15:16:23 2014
@@ -34,7 +34,7 @@ public class UninitializedObjectType ext
private static final long serialVersionUID = -1228341777713117641L;
/** The "initialized" version. */
- private ObjectType initialized;
+ private final ObjectType initialized;
/** Creates a new instance. */
public UninitializedObjectType(ObjectType t){