commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1697741 - in /commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic: ConstantPoolGen.java InstructionFactory.java MethodGen.java
Date Tue, 25 Aug 2015 17:07:44 GMT
Author: sebb
Date: Tue Aug 25 17:07:43 2015
New Revision: 1697741

URL: http://svn.apache.org/r1697741
Log:
No need for these to be package protected
Some can be final

Modified:
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ConstantPoolGen.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/InstructionFactory.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/MethodGen.java

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ConstantPoolGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ConstantPoolGen.java?rev=1697741&r1=1697740&r2=1697741&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ConstantPoolGen.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ConstantPoolGen.java
Tue Aug 25 17:07:43 2015
@@ -79,7 +79,7 @@ public class ConstantPoolGen {
 
     private static class Index {
 
-        int index; // TODO this could be final
+        final int index;
 
 
         Index(int i) {

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/InstructionFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/InstructionFactory.java?rev=1697741&r1=1697740&r2=1697741&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/InstructionFactory.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/InstructionFactory.java
Tue Aug 25 17:07:43 2015
@@ -172,10 +172,10 @@ public class InstructionFactory {
 
     private static class MethodObject {
 
-        Type[] arg_types;
-        Type result_type;
-        String class_name;
-        String name;
+        final Type[] arg_types;
+        final Type result_type;
+        final String class_name;
+        final String name;
 
 
         MethodObject(String c, String n, Type r, Type[] a) {

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/MethodGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/MethodGen.java?rev=1697741&r1=1697740&r2=1697741&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/MethodGen.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/MethodGen.java
Tue Aug 25 17:07:43 2015
@@ -866,8 +866,8 @@ public class MethodGen extends FieldGenO
 
     static final class BranchTarget {
 
-        InstructionHandle target;
-        int stackDepth;
+        final InstructionHandle target;
+        final int stackDepth;
 
 
         BranchTarget(InstructionHandle target, int stackDepth) {
@@ -878,8 +878,8 @@ public class MethodGen extends FieldGenO
 
     static final class BranchStack {
 
-        Stack<BranchTarget> branchTargets = new Stack<>();
-        Hashtable<InstructionHandle, BranchTarget> visitedTargets = new Hashtable<>();
+        private Stack<BranchTarget> branchTargets = new Stack<>();
+        private Hashtable<InstructionHandle, BranchTarget> visitedTargets = new Hashtable<>();
 
 
         public void push( InstructionHandle target, int stackDepth ) {



Mime
View raw message