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 2016/06/01 04:25:32 UTC
svn commit: r1746378 [13/13] - in /commons/proper/bcel/trunk/src:
main/java/org/apache/commons/bcel6/
main/java/org/apache/commons/bcel6/classfile/
main/java/org/apache/commons/bcel6/generic/
main/java/org/apache/commons/bcel6/util/ main/java/org/apach...
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/AbstractTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/AbstractTestCase.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/AbstractTestCase.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/AbstractTestCase.java Wed Jun 1 04:25:27 2016
@@ -53,17 +53,17 @@ public abstract class AbstractTestCase e
* @param name
* @return Path to file under the TESTDATA directory
*/
- protected File createTestdataFile(String name)
+ protected File createTestdataFile(final String name)
{
return new File(TESTDATA, name);
}
- protected JavaClass getTestClass(String name) throws ClassNotFoundException
+ protected JavaClass getTestClass(final String name) throws ClassNotFoundException
{
return SyntheticRepository.getInstance().loadClass(name);
}
- protected Method getMethod(JavaClass cl, String methodname)
+ protected Method getMethod(final JavaClass cl, final String methodname)
{
Method[] methods = cl.getMethods();
for (Method m : methods) {
@@ -80,7 +80,7 @@ public abstract class AbstractTestCase e
* @param name
* @return
*/
- protected boolean wipe(String name)
+ protected boolean wipe(final String name)
{
return new File(TESTDATA, name).delete();
}
@@ -91,7 +91,7 @@ public abstract class AbstractTestCase e
* @param name
* @return true if the file was deleted
*/
- protected boolean wipe(String dir, String name)
+ protected boolean wipe(final String dir, final String name)
{
// The parameter is relative to the TESTDATA dir
boolean b = wipe(dir + File.separator + name);
@@ -108,14 +108,14 @@ public abstract class AbstractTestCase e
return b;
}
- public SyntheticRepository createRepos(String cpentry)
+ public SyntheticRepository createRepos(final String cpentry)
{
ClassPath cp = new ClassPath("target" + File.separator + "testdata"
+ File.separator + cpentry + File.separator);
return SyntheticRepository.getInstance(cp);
}
- protected Attribute[] findAttribute(String name, JavaClass clazz)
+ protected Attribute[] findAttribute(final String name, final JavaClass clazz)
{
Attribute[] all = clazz.getAttributes();
List<Attribute> chosenAttrsList = new ArrayList<>();
@@ -130,7 +130,7 @@ public abstract class AbstractTestCase e
return chosenAttrsList.toArray(new Attribute[] {});
}
- protected Attribute findAttribute(String name, Attribute[] all)
+ protected Attribute findAttribute(final String name, final Attribute[] all)
{
List<Attribute> chosenAttrsList = new ArrayList<>();
for (Attribute element : all) {
@@ -146,7 +146,7 @@ public abstract class AbstractTestCase e
return chosenAttrsList.get(0);
}
- protected String dumpAttributes(Attribute[] as)
+ protected String dumpAttributes(final Attribute[] as)
{
StringBuilder result = new StringBuilder();
result.append("AttributeArray:[");
@@ -162,7 +162,7 @@ public abstract class AbstractTestCase e
return result.toString();
}
- protected String dumpAnnotationEntries(AnnotationEntry[] as)
+ protected String dumpAnnotationEntries(final AnnotationEntry[] as)
{
StringBuilder result = new StringBuilder();
result.append("[");
@@ -178,7 +178,7 @@ public abstract class AbstractTestCase e
return result.toString();
}
- protected String dumpAnnotationEntries(AnnotationEntryGen[] as)
+ protected String dumpAnnotationEntries(final AnnotationEntryGen[] as)
{
StringBuilder result = new StringBuilder();
result.append("[");
@@ -194,8 +194,8 @@ public abstract class AbstractTestCase e
return result.toString();
}
- public AnnotationEntryGen createFruitAnnotationEntry(ConstantPoolGen cp,
- String aFruit, boolean visibility)
+ public AnnotationEntryGen createFruitAnnotationEntry(final ConstantPoolGen cp,
+ final String aFruit, final boolean visibility)
{
SimpleElementValueGen evg = new SimpleElementValueGen(
ElementValueGen.STRING, cp, aFruit);
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/ElementValueGenTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/ElementValueGenTestCase.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/ElementValueGenTestCase.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/ElementValueGenTestCase.java Wed Jun 1 04:25:27 2016
@@ -34,7 +34,7 @@ import org.apache.commons.bcel6.generic.
public class ElementValueGenTestCase extends AbstractTestCase
{
- private ClassGen createClassGen(String classname)
+ private ClassGen createClassGen(final String classname)
{
return new ClassGen(classname, "java.lang.Object", "<generated>",
Const.ACC_PUBLIC | Const.ACC_SUPER, null);
@@ -209,7 +209,7 @@ public class ElementValueGenTestCase ext
checkSerialize(evg, cp);
}
- private void checkSerialize(ElementValueGen evgBefore, ConstantPoolGen cpg)
+ private void checkSerialize(final ElementValueGen evgBefore, final ConstantPoolGen cpg)
{
try
{
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/NanoTimer.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/NanoTimer.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/NanoTimer.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/NanoTimer.java Wed Jun 1 04:25:27 2016
@@ -31,7 +31,7 @@ public class NanoTimer {
time += System.nanoTime();
}
- public void subtract(NanoTimer o) {
+ public void subtract(final NanoTimer o) {
time -= o.time;
}
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/PerformanceTest.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/PerformanceTest.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/PerformanceTest.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/PerformanceTest.java Wed Jun 1 04:25:27 2016
@@ -66,7 +66,7 @@ public final class PerformanceTest exten
}
}
- private static void test(File lib) throws IOException {
+ private static void test(final File lib) throws IOException {
NanoTimer total = new NanoTimer();
NanoTimer parseTime = new NanoTimer();
NanoTimer cgenTime = new NanoTimer();
@@ -136,7 +136,7 @@ public final class PerformanceTest exten
javaLib.listFiles(new FileFilter() {
@Override
- public boolean accept(File file) {
+ public boolean accept(final File file) {
if(file.getName().endsWith(".jar")) {
try {
test(file);
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/classfile/JDKClassDumpTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/classfile/JDKClassDumpTestCase.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/classfile/JDKClassDumpTestCase.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/classfile/JDKClassDumpTestCase.java Wed Jun 1 04:25:27 2016
@@ -43,7 +43,7 @@ public class JDKClassDumpTestCase {
javaLib.listFiles(new FileFilter() {
@Override
- public boolean accept(File file) {
+ public boolean accept(final File file) {
if(file.getName().endsWith(".jar")) {
try {
testJar(file);
@@ -57,7 +57,7 @@ public class JDKClassDumpTestCase {
}
- private void testJar(File file) throws Exception {
+ private void testJar(final File file) throws Exception {
System.out.println("parsing " + file);
JarFile jar = new JarFile(file);
Enumeration<JarEntry> en = jar.entries();
@@ -76,7 +76,7 @@ public class JDKClassDumpTestCase {
jar.close();
}
- private void compare(JavaClass jc, InputStream inputStream, String name) throws Exception {
+ private void compare(final JavaClass jc, final InputStream inputStream, final String name) throws Exception {
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
jc.dump(dos);
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/data/AnnotatedWithCombinedAnnotation.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/data/AnnotatedWithCombinedAnnotation.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/data/AnnotatedWithCombinedAnnotation.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/data/AnnotatedWithCombinedAnnotation.java Wed Jun 1 04:25:27 2016
@@ -21,7 +21,7 @@ package org.apache.commons.bcel6.data;
@CombinedAnnotation( { @SimpleAnnotation(id = 4) })
public class AnnotatedWithCombinedAnnotation
{
- public AnnotatedWithCombinedAnnotation(int param1, @SimpleAnnotation(id=42) int param2) {
+ public AnnotatedWithCombinedAnnotation(final int param1, @SimpleAnnotation(id=42) final int param2) {
}
@CombinedAnnotation( {})
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/data/AttributeTestClassEM01.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/data/AttributeTestClassEM01.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/data/AttributeTestClassEM01.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/data/AttributeTestClassEM01.java Wed Jun 1 04:25:27 2016
@@ -20,7 +20,7 @@ package org.apache.commons.bcel6.data;
public class AttributeTestClassEM01
{
- public static void main(String[] argv)
+ public static void main(final String[] argv)
{
@SuppressWarnings("unused")
class S
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/data/AttributeTestClassEM02.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/data/AttributeTestClassEM02.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/data/AttributeTestClassEM02.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/data/AttributeTestClassEM02.java Wed Jun 1 04:25:27 2016
@@ -29,7 +29,7 @@ public class AttributeTestClassEM02
}
};
- public static void main(String[] argv)
+ public static void main(final String[] argv)
{
}
}
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/data/PLSETestClass.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/data/PLSETestClass.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/data/PLSETestClass.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/data/PLSETestClass.java Wed Jun 1 04:25:27 2016
@@ -22,13 +22,13 @@ import java.util.ArrayList;
public class PLSETestClass
{
- public void meth1(int arg1)
+ public void meth1(final int arg1)
{
@SuppressWarnings("unused")
int local1 = arg1;
}
- public void meth2(int arg1, ArrayList<String> arg2, int arg3)
+ public void meth2(final int arg1, final ArrayList<String> arg2, final int arg3)
{
@SuppressWarnings("unused")
int local1 = arg1;
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/data/SimpleClass.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/data/SimpleClass.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/data/SimpleClass.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/data/SimpleClass.java Wed Jun 1 04:25:27 2016
@@ -20,7 +20,7 @@ package org.apache.commons.bcel6.data;
public class SimpleClass
{
- public static void main(String[] argv)
+ public static void main(final String[] argv)
{
// Nothing unusual in this class
}
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/generic/AnnotationGenTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/generic/AnnotationGenTestCase.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/generic/AnnotationGenTestCase.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/generic/AnnotationGenTestCase.java Wed Jun 1 04:25:27 2016
@@ -34,7 +34,7 @@ import org.apache.commons.bcel6.classfil
public class AnnotationGenTestCase extends AbstractTestCase
{
- private ClassGen createClassGen(String classname)
+ private ClassGen createClassGen(final String classname)
{
return new ClassGen(classname, "java.lang.Object", "<generated>",
Const.ACC_PUBLIC | Const.ACC_SUPER, null);
@@ -118,7 +118,7 @@ public class AnnotationGenTestCase exten
assertTrue("Should have seen a RuntimeInvisibleAnnotation", foundRIV);
}
- private void checkSerialize(AnnotationEntryGen a, ConstantPoolGen cpg)
+ private void checkSerialize(final AnnotationEntryGen a, final ConstantPoolGen cpg)
{
try
{
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/generic/FieldAnnotationsTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/generic/FieldAnnotationsTestCase.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/generic/FieldAnnotationsTestCase.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/generic/FieldAnnotationsTestCase.java Wed Jun 1 04:25:27 2016
@@ -113,9 +113,9 @@ public class FieldAnnotationsTestCase ex
}
// helper methods
- public void checkAnnotatedField(JavaClass clazz, String fieldname,
- String AnnotationEntryName, String AnnotationEntryElementName,
- String AnnotationEntryElementValue)
+ public void checkAnnotatedField(final JavaClass clazz, final String fieldname,
+ final String AnnotationEntryName, final String AnnotationEntryElementName,
+ final String AnnotationEntryElementValue)
{
Field[] fields = clazz.getFields();
for (Field f : fields) {
@@ -128,8 +128,8 @@ public class FieldAnnotationsTestCase ex
}
}
- private void checkAnnotationEntry(AnnotationEntry a, String name, String elementname,
- String elementvalue)
+ private void checkAnnotationEntry(final AnnotationEntry a, final String name, final String elementname,
+ final String elementvalue)
{
assertTrue("Expected AnnotationEntry to have name " + name
+ " but it had name " + a.getAnnotationType(), a.getAnnotationType()
@@ -146,7 +146,7 @@ public class FieldAnnotationsTestCase ex
}
// helper methods
- public void checkValue(AnnotationEntry a, String name, String tostring)
+ public void checkValue(final AnnotationEntry a, final String name, final String tostring)
{
for (int i = 0; i < a.getElementValuePairs().length; i++)
{
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/generic/GeneratingAnnotatedClassesTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/generic/GeneratingAnnotatedClassesTestCase.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/generic/GeneratingAnnotatedClassesTestCase.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/generic/GeneratingAnnotatedClassesTestCase.java Wed Jun 1 04:25:27 2016
@@ -281,7 +281,7 @@ public class GeneratingAnnotatedClassesT
}
}
- private void assertMethodAnnotations(Method method, int expectedNumberAnnotations, int nExpectedArrayValues)
+ private void assertMethodAnnotations(final Method method, final int expectedNumberAnnotations, final int nExpectedArrayValues)
{
String methodName= method.getName();
AnnotationEntry[] annos= method.getAnnotationEntries();
@@ -292,7 +292,7 @@ public class GeneratingAnnotatedClassesT
}
}
- private void assertArrayElementValue(int nExpectedArrayValues, AnnotationEntry anno)
+ private void assertArrayElementValue(final int nExpectedArrayValues, final AnnotationEntry anno)
{
ElementValuePair elementValuePair = anno.getElementValuePairs()[0];
assertEquals("value", elementValuePair.getNameString());
@@ -301,7 +301,7 @@ public class GeneratingAnnotatedClassesT
assertEquals(nExpectedArrayValues, eva.length);
}
- private void assertParameterAnnotations(Method method, int... expectedNumberOfParmeterAnnotations)
+ private void assertParameterAnnotations(final Method method, final int... expectedNumberOfParmeterAnnotations)
{
String methodName= "For "+method.getName();
ParameterAnnotationEntry[] parameterAnnotations= method.getParameterAnnotationEntries();
@@ -320,7 +320,7 @@ public class GeneratingAnnotatedClassesT
}
}
- private void assertSimpleElementValue(AnnotationEntry anno)
+ private void assertSimpleElementValue(final AnnotationEntry anno)
{
ElementValuePair elementValuePair = anno.getElementValuePairs()[0];
assertEquals("id", elementValuePair.getNameString());
@@ -393,7 +393,7 @@ public class GeneratingAnnotatedClassesT
// System.err.println(jc2.toString());
}
- private void dumpClass(ClassGen cg, String fname)
+ private void dumpClass(final ClassGen cg, final String fname)
{
try
{
@@ -406,13 +406,13 @@ public class GeneratingAnnotatedClassesT
}
}
- private void dumpClass(ClassGen cg, String dir, String fname)
+ private void dumpClass(final ClassGen cg, final String dir, final String fname)
{
dumpClass(cg, dir + File.separator + fname);
}
- private void buildClassContentsWithAnnotatedMethods(ClassGen cg,
- ConstantPoolGen cp, InstructionList il)
+ private void buildClassContentsWithAnnotatedMethods(final ClassGen cg,
+ final ConstantPoolGen cp, final InstructionList il)
{
// Create method 'public static void main(String[]argv)'
MethodGen mg = createMethodGen("main", il, cp);
@@ -507,8 +507,8 @@ public class GeneratingAnnotatedClassesT
cg.addEmptyConstructor(Const.ACC_PUBLIC);
}
- private void buildClassContents(ClassGen cg, ConstantPoolGen cp,
- InstructionList il)
+ private void buildClassContents(final ClassGen cg, final ConstantPoolGen cp,
+ final InstructionList il)
{
// Create method 'public static void main(String[]argv)'
MethodGen mg = createMethodGen("main", il, cp);
@@ -601,7 +601,7 @@ public class GeneratingAnnotatedClassesT
cg.addEmptyConstructor(Const.ACC_PUBLIC);
}
- private JavaClass getClassFrom(String where, String clazzname)
+ private JavaClass getClassFrom(final String where, final String clazzname)
throws ClassNotFoundException
{
// System.out.println(where);
@@ -610,14 +610,14 @@ public class GeneratingAnnotatedClassesT
}
// helper methods
- private ClassGen createClassGen(String classname)
+ private ClassGen createClassGen(final String classname)
{
return new ClassGen(classname, "java.lang.Object", "<generated>",
Const.ACC_PUBLIC | Const.ACC_SUPER, null);
}
- private MethodGen createMethodGen(String methodname, InstructionList il,
- ConstantPoolGen cp)
+ private MethodGen createMethodGen(final String methodname, final InstructionList il,
+ final ConstantPoolGen cp)
{
return new MethodGen(Const.ACC_STATIC | Const.ACC_PUBLIC, // access
// flags
@@ -629,7 +629,7 @@ public class GeneratingAnnotatedClassesT
il, cp);
}
- public AnnotationEntryGen createSimpleVisibleAnnotation(ConstantPoolGen cp)
+ public AnnotationEntryGen createSimpleVisibleAnnotation(final ConstantPoolGen cp)
{
SimpleElementValueGen evg = new SimpleElementValueGen(
ElementValueGen.PRIMITIVE_INT, cp, 4);
@@ -641,8 +641,8 @@ public class GeneratingAnnotatedClassesT
return a;
}
- public AnnotationEntryGen createFruitAnnotation(ConstantPoolGen cp,
- String aFruit)
+ public AnnotationEntryGen createFruitAnnotation(final ConstantPoolGen cp,
+ final String aFruit)
{
SimpleElementValueGen evg = new SimpleElementValueGen(
ElementValueGen.STRING, cp, aFruit);
@@ -653,7 +653,7 @@ public class GeneratingAnnotatedClassesT
return new AnnotationEntryGen(t, elements, true, cp);
}
- public AnnotationEntryGen createCombinedAnnotation(ConstantPoolGen cp)
+ public AnnotationEntryGen createCombinedAnnotation(final ConstantPoolGen cp)
{
// Create an annotation instance
AnnotationEntryGen a = createSimpleVisibleAnnotation(cp);
@@ -666,7 +666,7 @@ public class GeneratingAnnotatedClassesT
elements, true, cp);
}
- public AnnotationEntryGen createSimpleInvisibleAnnotation(ConstantPoolGen cp)
+ public AnnotationEntryGen createSimpleInvisibleAnnotation(final ConstantPoolGen cp)
{
SimpleElementValueGen evg = new SimpleElementValueGen(
ElementValueGen.PRIMITIVE_INT, cp, 4);
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/generic/JDKGenericDumpTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/generic/JDKGenericDumpTestCase.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/generic/JDKGenericDumpTestCase.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/generic/JDKGenericDumpTestCase.java Wed Jun 1 04:25:27 2016
@@ -48,7 +48,7 @@ public class JDKGenericDumpTestCase {
}
}
- private void testJar(File file) throws Exception {
+ private void testJar(final File file) throws Exception {
System.out.println(file);
JarFile jar = new JarFile(file);
Enumeration<JarEntry> en = jar.entries();
@@ -69,7 +69,7 @@ public class JDKGenericDumpTestCase {
jar.close();
}
- private void compare(String name, Method m) {
+ private void compare(final String name, final Method m) {
// System.out.println("Method: " + m);
Code c = m.getCode();
if (c==null) {
@@ -95,14 +95,14 @@ public class JDKGenericDumpTestCase {
File javaLib = new File(System.getProperty("java.home") + "/lib");
return javaLib.listFiles(new FileFilter() {
@Override
- public boolean accept(File file) {
+ public boolean accept(final File file) {
return file.getName().endsWith(".jar");
}
});
}
private static final char[] hexArray = "0123456789ABCDEF".toCharArray();
- private static String bytesToHex(byte[] bytes) {
+ private static String bytesToHex(final byte[] bytes) {
char[] hexChars = new char[bytes.length * 3];
int i=0;
for ( int j = 0; j < bytes.length; j++ ) {
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/generic/MethodGenTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/generic/MethodGenTestCase.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/generic/MethodGenTestCase.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/generic/MethodGenTestCase.java Wed Jun 1 04:25:27 2016
@@ -34,7 +34,7 @@ public class MethodGenTestCase extends T
}
}
- private MethodGen getMethod(Class<?> cls, String name) throws ClassNotFoundException {
+ private MethodGen getMethod(final Class<?> cls, final String name) throws ClassNotFoundException {
JavaClass jc = Repository.lookupClass(cls);
ConstantPoolGen cp = new ConstantPoolGen(jc.getConstantPool());
for (Method method : jc.getMethods()) {
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/util/BCELifierTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/util/BCELifierTestCase.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/util/BCELifierTestCase.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/util/BCELifierTestCase.java Wed Jun 1 04:25:27 2016
@@ -34,7 +34,7 @@ public class BCELifierTestCase {
testClassOnPath("target/test-classes/Java8Example.class");
}
- private void testClassOnPath(String javaClass) throws Exception {
+ private void testClassOnPath(final String javaClass) throws Exception {
// Get javap of the input class
final String initial = exec(null, "javap", "-p", "-c", javaClass);
@@ -53,7 +53,7 @@ public class BCELifierTestCase {
assertEquals(initial, output);
}
- private String exec(File workDir, String ... args) throws Exception {
+ private String exec(final File workDir, final String ... args) throws Exception {
// System.err.println(java.util.Arrays.toString(args));
ProcessBuilder pb = new ProcessBuilder( args );
pb.directory(workDir);
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/AbstractVerifierTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/AbstractVerifierTestCase.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/AbstractVerifierTestCase.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/AbstractVerifierTestCase.java Wed Jun 1 04:25:27 2016
@@ -33,7 +33,7 @@ public abstract class AbstractVerifierTe
* @param classname simple classname of the class to verify
* @param message message displayed if assertion fails
*/
- public void assertVerifyOK(String classname, String message) {
+ public void assertVerifyOK(final String classname, final String message) {
final String testClassname = TEST_PACKAGE + classname;
assertTrue(message, doAllPasses(testClassname));
}
@@ -45,7 +45,7 @@ public abstract class AbstractVerifierTe
* @param classname simple classname of the class to verify
* @param message message displayed if assertion fails
*/
- public void assertVerifyRejected(String classname, String message) {
+ public void assertVerifyRejected(final String classname, final String message) {
final String testClassname = TEST_PACKAGE + classname;
assertFalse(message, doAllPasses(testClassname));
}
@@ -56,7 +56,7 @@ public abstract class AbstractVerifierTe
* @param classname name of the class to verify
* @return false if the verification fails, true otherwise
*/
- public boolean doAllPasses(String classname) {
+ public boolean doAllPasses(final String classname) {
int nbMethods = 0;
try {
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArray01.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArray01.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArray01.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArray01.java Wed Jun 1 04:25:27 2016
@@ -31,13 +31,13 @@ public class TestArray01{
return a;
}
- public static void test2(Object o){
+ public static void test2(final Object o){
}
- public static void test3(Serializable o){
+ public static void test3(final Serializable o){
}
- public static void test4(Cloneable o){
+ public static void test4(final Cloneable o){
}
public static Serializable test5(){
@@ -48,7 +48,7 @@ public class TestArray01{
return new Object[1];
}
- public static Object foo(String s){
+ public static Object foo(final String s){
return s;
}
}
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess02Creator.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess02Creator.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess02Creator.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess02Creator.java Wed Jun 1 04:25:27 2016
@@ -47,7 +47,7 @@ public class TestArrayAccess02Creator ex
}
@Override
-public void create(OutputStream out) throws IOException {
+public void create(final OutputStream out) throws IOException {
createMethod_0();
createMethod_1();
_cg.getJavaClass().dump(out);
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess03Creator.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess03Creator.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess03Creator.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess03Creator.java Wed Jun 1 04:25:27 2016
@@ -47,7 +47,7 @@ public class TestArrayAccess03Creator ex
}
@Override
-public void create(OutputStream out) throws IOException {
+public void create(final OutputStream out) throws IOException {
createMethod_0();
createMethod_1();
_cg.getJavaClass().dump(out);
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess04Creator.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess04Creator.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess04Creator.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess04Creator.java Wed Jun 1 04:25:27 2016
@@ -47,7 +47,7 @@ public class TestArrayAccess04Creator ex
}
@Override
-public void create(OutputStream out) throws IOException {
+public void create(final OutputStream out) throws IOException {
createMethod_0();
createMethod_1();
_cg.getJavaClass().dump(out);
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeInterface01.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeInterface01.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeInterface01.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeInterface01.java Wed Jun 1 04:25:27 2016
@@ -19,7 +19,7 @@ package org.apache.commons.bcel6.verifie
public class TestLegalInvokeInterface01{
- public static void test1(Interface01 t){
+ public static void test1(final Interface01 t){
t.run();
}
}
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeSpecial02.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeSpecial02.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeSpecial02.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeSpecial02.java Wed Jun 1 04:25:27 2016
@@ -19,7 +19,7 @@ package org.apache.commons.bcel6.verifie
public abstract class TestLegalInvokeSpecial02 implements Runnable{
- public static void test1(TestLegalInvokeSpecial02 t, int i){
+ public static void test1(final TestLegalInvokeSpecial02 t, final int i){
if(i > 0){
t.run();
}
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeVirtual02.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeVirtual02.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeVirtual02.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeVirtual02.java Wed Jun 1 04:25:27 2016
@@ -19,7 +19,7 @@ package org.apache.commons.bcel6.verifie
public abstract class TestLegalInvokeVirtual02 implements Runnable{
- public static void test1(TestLegalInvokeVirtual02 t, int i){
+ public static void test1(final TestLegalInvokeVirtual02 t, final int i){
if(i > 0){
t.run();
}
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn01Creator.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn01Creator.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn01Creator.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn01Creator.java Wed Jun 1 04:25:27 2016
@@ -45,7 +45,7 @@ public class TestReturn01Creator extends
}
@Override
-public void create(OutputStream out) throws IOException {
+public void create(final OutputStream out) throws IOException {
createMethod_0();
createMethod_1();
_cg.getJavaClass().dump(out);
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn02.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn02.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn02.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn02.java Wed Jun 1 04:25:27 2016
@@ -19,7 +19,7 @@ package org.apache.commons.bcel6.verifie
public class TestReturn02 {
- public static String test1(char[] data, int offset, int count) {
+ public static String test1(final char[] data, final int offset, final int count) {
return new String(data, offset, count);
}
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn03Creator.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn03Creator.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn03Creator.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn03Creator.java Wed Jun 1 04:25:27 2016
@@ -45,7 +45,7 @@ public class TestReturn03Creator extends
}
@Override
-public void create(OutputStream out) throws IOException {
+public void create(final OutputStream out) throws IOException {
createMethod_0();
createMethod_1();
_cg.getJavaClass().dump(out);
Modified: commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/visitors/CounterVisitor.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/visitors/CounterVisitor.java?rev=1746378&r1=1746377&r2=1746378&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/visitors/CounterVisitor.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/visitors/CounterVisitor.java Wed Jun 1 04:25:27 2016
@@ -155,269 +155,269 @@ public class CounterVisitor implements V
@Override
- public void visitAnnotation(Annotations obj)
+ public void visitAnnotation(final Annotations obj)
{
annotationCount++;
}
@Override
- public void visitAnnotationDefault(AnnotationDefault obj)
+ public void visitAnnotationDefault(final AnnotationDefault obj)
{
annotationDefaultCount++;
}
@Override
- public void visitAnnotationEntry(AnnotationEntry obj)
+ public void visitAnnotationEntry(final AnnotationEntry obj)
{
annotationEntryCount++;
}
@Override
- public void visitCode(Code obj)
+ public void visitCode(final Code obj)
{
codeCount++;
}
@Override
- public void visitCodeException(CodeException obj)
+ public void visitCodeException(final CodeException obj)
{
codeExceptionCount++;
}
@Override
- public void visitConstantClass(ConstantClass obj)
+ public void visitConstantClass(final ConstantClass obj)
{
constantClassCount++;
}
@Override
- public void visitConstantDouble(ConstantDouble obj)
+ public void visitConstantDouble(final ConstantDouble obj)
{
constantDoubleCount++;
}
@Override
- public void visitConstantFieldref(ConstantFieldref obj)
+ public void visitConstantFieldref(final ConstantFieldref obj)
{
constantFieldrefCount++;
}
@Override
- public void visitConstantFloat(ConstantFloat obj)
+ public void visitConstantFloat(final ConstantFloat obj)
{
constantFloatCount++;
}
@Override
- public void visitConstantInteger(ConstantInteger obj)
+ public void visitConstantInteger(final ConstantInteger obj)
{
constantIntegerCount++;
}
@Override
- public void visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj)
+ public void visitConstantInterfaceMethodref(final ConstantInterfaceMethodref obj)
{
constantInterfaceMethodrefCount++;
}
@Override
- public void visitConstantLong(ConstantLong obj)
+ public void visitConstantLong(final ConstantLong obj)
{
constantLongCount++;
}
@Override
- public void visitConstantMethodref(ConstantMethodref obj)
+ public void visitConstantMethodref(final ConstantMethodref obj)
{
constantMethodrefCount++;
}
@Override
- public void visitConstantNameAndType(ConstantNameAndType obj)
+ public void visitConstantNameAndType(final ConstantNameAndType obj)
{
constantNameAndTypeCount++;
}
@Override
- public void visitConstantPool(ConstantPool obj)
+ public void visitConstantPool(final ConstantPool obj)
{
constantPoolCount++;
}
@Override
- public void visitConstantString(ConstantString obj)
+ public void visitConstantString(final ConstantString obj)
{
constantStringCount++;
}
@Override
- public void visitConstantUtf8(ConstantUtf8 obj)
+ public void visitConstantUtf8(final ConstantUtf8 obj)
{
constantUtf8Count++;
}
@Override
- public void visitConstantValue(ConstantValue obj)
+ public void visitConstantValue(final ConstantValue obj)
{
constantValueCount++;
}
@Override
- public void visitDeprecated(Deprecated obj)
+ public void visitDeprecated(final Deprecated obj)
{
deprecatedCount++;
}
@Override
- public void visitEnclosingMethod(EnclosingMethod obj)
+ public void visitEnclosingMethod(final EnclosingMethod obj)
{
enclosingMethodCount++;
}
@Override
- public void visitExceptionTable(ExceptionTable obj)
+ public void visitExceptionTable(final ExceptionTable obj)
{
exceptionTableCount++;
}
@Override
- public void visitField(Field obj)
+ public void visitField(final Field obj)
{
fieldCount++;
}
@Override
- public void visitInnerClass(InnerClass obj)
+ public void visitInnerClass(final InnerClass obj)
{
innerClassCount++;
}
@Override
- public void visitInnerClasses(InnerClasses obj)
+ public void visitInnerClasses(final InnerClasses obj)
{
innerClassesCount++;
}
@Override
- public void visitJavaClass(JavaClass obj)
+ public void visitJavaClass(final JavaClass obj)
{
javaClassCount++;
}
@Override
- public void visitLineNumber(LineNumber obj)
+ public void visitLineNumber(final LineNumber obj)
{
lineNumberCount++;
}
@Override
- public void visitLineNumberTable(LineNumberTable obj)
+ public void visitLineNumberTable(final LineNumberTable obj)
{
lineNumberTableCount++;
}
@Override
- public void visitLocalVariable(LocalVariable obj)
+ public void visitLocalVariable(final LocalVariable obj)
{
localVariableCount++;
}
@Override
- public void visitLocalVariableTable(LocalVariableTable obj)
+ public void visitLocalVariableTable(final LocalVariableTable obj)
{
localVariableTableCount++;
}
@Override
- public void visitLocalVariableTypeTable(LocalVariableTypeTable obj)
+ public void visitLocalVariableTypeTable(final LocalVariableTypeTable obj)
{
localVariableTypeTableCount++;
}
@Override
- public void visitMethod(Method obj)
+ public void visitMethod(final Method obj)
{
methodCount++;
}
@Override
- public void visitParameterAnnotation(ParameterAnnotations obj)
+ public void visitParameterAnnotation(final ParameterAnnotations obj)
{
parameterAnnotationCount++;
}
@Override
- public void visitSignature(Signature obj)
+ public void visitSignature(final Signature obj)
{
signatureAnnotationCount++;
}
@Override
- public void visitSourceFile(SourceFile obj)
+ public void visitSourceFile(final SourceFile obj)
{
sourceFileCount++;
}
@Override
- public void visitStackMap(StackMap obj)
+ public void visitStackMap(final StackMap obj)
{
stackMapCount++;
}
@Override
- public void visitStackMapEntry(StackMapEntry obj)
+ public void visitStackMapEntry(final StackMapEntry obj)
{
stackMapEntryCount++;
}
@Override
- public void visitSynthetic(Synthetic obj)
+ public void visitSynthetic(final Synthetic obj)
{
syntheticCount++;
}
@Override
- public void visitUnknown(Unknown obj)
+ public void visitUnknown(final Unknown obj)
{
unknownCount++;
}
/** @since 6.0 */
@Override
- public void visitBootstrapMethods(BootstrapMethods obj)
+ public void visitBootstrapMethods(final BootstrapMethods obj)
{
bootstrapMethodsCount++;
}
/** @since 6.0 */
@Override
- public void visitMethodParameters(MethodParameters obj)
+ public void visitMethodParameters(final MethodParameters obj)
{
methodParametersCount++;
}
/** @since 6.0 */
@Override
- public void visitConstantInvokeDynamic(ConstantInvokeDynamic obj)
+ public void visitConstantInvokeDynamic(final ConstantInvokeDynamic obj)
{
constantInvokeDynamic++;
}
/** @since 6.0 */
@Override
- public void visitConstantMethodType(ConstantMethodType obj) {
+ public void visitConstantMethodType(final ConstantMethodType obj) {
// TODO Auto-generated method stub
}
/** @since 6.0 */
@Override
- public void visitConstantMethodHandle(ConstantMethodHandle constantMethodHandle) {
+ public void visitConstantMethodHandle(final ConstantMethodHandle constantMethodHandle) {
// TODO Auto-generated method stub
}
/** @since 6.0 */
@Override
- public void visitParameterAnnotationEntry(ParameterAnnotationEntry parameterAnnotationEntry) {
+ public void visitParameterAnnotationEntry(final ParameterAnnotationEntry parameterAnnotationEntry) {
// TODO Auto-generated method stub
}
}