commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1806198 - in /commons/proper/bcel/trunk/src: main/java/org/apache/bcel/generic/ test/java/org/apache/bcel/ test/java/org/apache/bcel/classfile/ test/java/org/apache/bcel/data/ test/java/org/apache/bcel/generic/ test/java/org/apache/bcel/vi...
Date Fri, 25 Aug 2017 16:29:49 GMT
Author: ggregory
Date: Fri Aug 25 16:29:49 2017
New Revision: 1806198

URL: http://svn.apache.org/viewvc?rev=1806198&view=rev
Log:
Add final modifier to method parameters.

Modified:
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/MethodGen.java
    commons/proper/bcel/trunk/src/test/java/org/apache/bcel/LocalVariableTypeTableTestCase.java
    commons/proper/bcel/trunk/src/test/java/org/apache/bcel/classfile/ConstantPoolTestCase.java
    commons/proper/bcel/trunk/src/test/java/org/apache/bcel/data/SimpleClassHasMethodIncludeGenericArgument.java
    commons/proper/bcel/trunk/src/test/java/org/apache/bcel/generic/MethodGenTestCase.java
    commons/proper/bcel/trunk/src/test/java/org/apache/bcel/visitors/CounterVisitor.java

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=1806198&r1=1806197&r2=1806198&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 Fri Aug
25 16:29:49 2017
@@ -683,7 +683,7 @@ public class MethodGen extends FieldGenO
         return m;
     }
 
-    private void updateLocalVariableTable(LocalVariableTable a) {
+    private void updateLocalVariableTable(final LocalVariableTable a) {
         final LocalVariable[] lv = a.getLocalVariableTable();
         removeLocalVariables();
         for (final LocalVariable l : lv) {
@@ -701,7 +701,7 @@ public class MethodGen extends FieldGenO
         }
     }
 
-    private void adjustLocalVariableLength(LocalVariableTable lvt) {
+    private void adjustLocalVariableLength(final LocalVariableTable lvt) {
         LocalVariable[] lv = lvt.getLocalVariableTable();
         LocalVariable[] lvg = local_variable_type_table.getLocalVariableTypeTable();
 

Modified: commons/proper/bcel/trunk/src/test/java/org/apache/bcel/LocalVariableTypeTableTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/LocalVariableTypeTableTestCase.java?rev=1806198&r1=1806197&r2=1806198&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/bcel/LocalVariableTypeTableTestCase.java
(original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/bcel/LocalVariableTypeTableTestCase.java
Fri Aug 25 16:29:49 2017
@@ -38,11 +38,11 @@ import java.util.List;
 
 public class LocalVariableTypeTableTestCase extends AbstractTestCase {
     public class TestClassLoader extends ClassLoader {
-        public TestClassLoader(ClassLoader parent) {
+        public TestClassLoader(final ClassLoader parent) {
             super(parent);
         }
 
-        public Class<?> findClass(String name, byte[] bytes) {
+        public Class<?> findClass(final String name, final byte[] bytes) {
             return defineClass(name, bytes, 0, bytes.length);
         }
     }
@@ -63,7 +63,7 @@ public class LocalVariableTypeTableTestC
         method.invoke(null, new LinkedList<String>(), "d2");
     }
 
-    private byte[] getBytesFromClass(String className) throws ClassNotFoundException, IOException
{
+    private byte[] getBytesFromClass(final String className) throws ClassNotFoundException,
IOException {
         JavaClass clazz = getTestClass(className);
         ConstantPoolGen cp = new ConstantPoolGen(clazz.getConstantPool());
 
@@ -81,7 +81,7 @@ public class LocalVariableTypeTableTestC
         return clazz.getBytes();
     }
 
-    public Method injection(JavaClass clazz, Method method, ConstantPoolGen cp, int firstStringOffset)
{
+    public Method injection(final JavaClass clazz, Method method, final ConstantPoolGen cp,
final int firstStringOffset) {
         MethodGen methodGen = new MethodGen(method, clazz.getClassName(), cp);
 
         InstructionList instructionList = methodGen.getInstructionList();
@@ -96,7 +96,7 @@ public class LocalVariableTypeTableTestC
         return method;
     }
 
-    public InstructionList makeWillBeAddedInstructionList(MethodGen methodGen, int firstStringOffset)
{
+    public InstructionList makeWillBeAddedInstructionList(final MethodGen methodGen, final
int firstStringOffset) {
         if (firstStringOffset == -1) {
             return new InstructionList();
         }
@@ -113,7 +113,7 @@ public class LocalVariableTypeTableTestC
         return createPrintln(methodGen.getConstantPool(), instruction);
     }
 
-    public InstructionList createPrintln(ConstantPoolGen cp, Instruction instruction) {
+    public InstructionList createPrintln(final ConstantPoolGen cp, final Instruction instruction)
{
         final InstructionList il = new InstructionList();
 
         final int out = cp.addFieldref("java.lang.System", "out", "Ljava/io/PrintStream;");
@@ -125,7 +125,7 @@ public class LocalVariableTypeTableTestC
         return il;
     }
 
-    public int findFirstStringLocalVariableOffset(Method method) {
+    public int findFirstStringLocalVariableOffset(final Method method) {
         Type[] argumentTypes = method.getArgumentTypes();
         int offset = -1;
 

Modified: commons/proper/bcel/trunk/src/test/java/org/apache/bcel/classfile/ConstantPoolTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/classfile/ConstantPoolTestCase.java?rev=1806198&r1=1806197&r2=1806198&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/bcel/classfile/ConstantPoolTestCase.java
(original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/bcel/classfile/ConstantPoolTestCase.java
Fri Aug 25 16:29:49 2017
@@ -41,7 +41,7 @@ public class ConstantPoolTestCase extend
         }
     }
 
-    private InstructionHandle[] getInstructionHandles(JavaClass clazz, ConstantPoolGen cp,
Method method) {
+    private InstructionHandle[] getInstructionHandles(final JavaClass clazz, final ConstantPoolGen
cp, final Method method) {
         MethodGen methodGen = new MethodGen(method, clazz.getClassName(), cp);
         InstructionList instructionList = methodGen.getInstructionList();
         return instructionList.getInstructionHandles();

Modified: commons/proper/bcel/trunk/src/test/java/org/apache/bcel/data/SimpleClassHasMethodIncludeGenericArgument.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/data/SimpleClassHasMethodIncludeGenericArgument.java?rev=1806198&r1=1806197&r2=1806198&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/bcel/data/SimpleClassHasMethodIncludeGenericArgument.java
(original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/bcel/data/SimpleClassHasMethodIncludeGenericArgument.java
Fri Aug 25 16:29:49 2017
@@ -20,15 +20,15 @@ package org.apache.bcel.data;
 import java.util.List;
 
 public class SimpleClassHasMethodIncludeGenericArgument {
-    public static void a(String a1, List<String> a2) {
+    public static void a(final String a1, final List<String> a2) {
     }
 
-    public static void b(String b1, List b2) {
+    public static void b(final String b1, final List b2) {
     }
 
-    public static void c(String c1, String c2) {
+    public static void c(final String c1, final String c2) {
     }
 
-    public static void d(List<String> d1, String d2) {
+    public static void d(final List<String> d1, final String d2) {
     }
 }

Modified: commons/proper/bcel/trunk/src/test/java/org/apache/bcel/generic/MethodGenTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/generic/MethodGenTestCase.java?rev=1806198&r1=1806197&r2=1806198&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/bcel/generic/MethodGenTestCase.java
(original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/bcel/generic/MethodGenTestCase.java
Fri Aug 25 16:29:49 2017
@@ -44,7 +44,7 @@ public class MethodGenTestCase extends T
 
     public static class Bar {
         public class Inner {
-            public Inner(@A Object a, @B Object b) {
+            public Inner(@A final Object a, @B final Object b) {
                 
             }
         }

Modified: commons/proper/bcel/trunk/src/test/java/org/apache/bcel/visitors/CounterVisitor.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/visitors/CounterVisitor.java?rev=1806198&r1=1806197&r2=1806198&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/bcel/visitors/CounterVisitor.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/bcel/visitors/CounterVisitor.java Fri
Aug 25 16:29:49 2017
@@ -431,13 +431,13 @@ public class CounterVisitor implements V
 
     /** @since 6.1 */
     @Override
-    public void visitConstantPackage(ConstantPackage constantPackage) {
+    public void visitConstantPackage(final ConstantPackage constantPackage) {
         constantPackageCount++;
     }
 
     /** @since 6.1 */
     @Override
-    public void visitConstantModule(ConstantModule constantModule) {
+    public void visitConstantModule(final ConstantModule constantModule) {
         constantModuleCount++;
     }
 }



Mime
View raw message