commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1696799 [3/3] - in /commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6: ./ generic/ util/ verifier/
Date Thu, 20 Aug 2015 14:42:04 GMT
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/ExceptionConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/ExceptionConstants.java?rev=1696799&r1=1696798&r2=1696799&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/ExceptionConstants.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/ExceptionConstants.java
Thu Aug 20 14:42:04 2015
@@ -22,7 +22,7 @@ package org.apache.commons.bcel6;
  *
  * @version $Id$
  */
-public class ExceptionConstants {
+public final class ExceptionConstants {
 
     /** The mother of all exceptions
      */
@@ -52,7 +52,8 @@ public class ExceptionConstants {
     /** Run-Time Exceptions 
      */
     public static final Class<NullPointerException> NULL_POINTER_EXCEPTION = NullPointerException.class;
-    public static final Class<ArrayIndexOutOfBoundsException> ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION
= ArrayIndexOutOfBoundsException.class;
+    public static final Class<ArrayIndexOutOfBoundsException> ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION
+                                                            = ArrayIndexOutOfBoundsException.class;
     public static final Class<ArithmeticException> ARITHMETIC_EXCEPTION = ArithmeticException.class;
     public static final Class<NegativeArraySizeException> NEGATIVE_ARRAY_SIZE_EXCEPTION
= NegativeArraySizeException.class;
     public static final Class<ClassCastException> CLASS_CAST_EXCEPTION = ClassCastException.class;
@@ -88,10 +89,12 @@ public class ExceptionConstants {
         EXCS_ARRAY_EXCEPTION,
     };
 
+    private ExceptionConstants() { } // not instantiable
+
     // helper method to merge exception class arrays
     private static Class<?>[] mergeExceptions(Class<?>[] input, Class<?>
... extraClasses) {
         int extraLen = extraClasses == null ? 0 : extraClasses.length;
-        Class<?> excs[] = new Class<?>[input.length + extraLen];
+        Class<?>[] excs = new Class<?>[input.length + extraLen];
         System.arraycopy(input, 0, excs, 0, input.length);
         if (extraLen > 0) {
             System.arraycopy(extraClasses, 0, excs, input.length, extraLen);            
@@ -121,4 +124,5 @@ public class ExceptionConstants {
             throw new AssertionError("Cannot happen; unexpected enum value: " + type);
         }
     }
+
 }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/AnnotationEntryGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/AnnotationEntryGen.java?rev=1696799&r1=1696798&r2=1696799&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/AnnotationEntryGen.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/AnnotationEntryGen.java
Thu Aug 20 14:42:04 2015
@@ -274,9 +274,9 @@ public class AnnotationEntryGen {
     static Attribute[] getParameterAnnotationAttributes(
             ConstantPoolGen cp,
             List<AnnotationEntryGen>[] /*Array of lists, array size depends on #params
*/vec) {
-        int visCount[] = new int[vec.length];
+        int[] visCount = new int[vec.length];
         int totalVisCount = 0;
-        int invisCount[] = new int[vec.length];
+        int[] invisCount = new int[vec.length];
         int totalInvisCount = 0;
         try {
             for (int i = 0; i < vec.length; i++) {

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/InstructionConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/InstructionConstants.java?rev=1696799&r1=1696798&r2=1696799&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/InstructionConstants.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/InstructionConstants.java
Thu Aug 20 14:42:04 2015
@@ -277,6 +277,8 @@ public class InstructionConstants {
             INSTRUCTIONS[Constants.MONITOREXIT] = MONITOREXIT;
     }
 
+    private InstructionConstants() { } // non-instantiable 
+
     /**
      * Gets the Instruction.
      * @param index the index, e.g. {@link Constants#RETURN}

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/Type.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/Type.java?rev=1696799&r1=1696798&r2=1696799&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/Type.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/Type.java Thu
Aug 20 14:42:04 2015
@@ -23,8 +23,6 @@ import java.util.List;
 import org.apache.commons.bcel6.Constants;
 import org.apache.commons.bcel6.classfile.ClassFormatException;
 import org.apache.commons.bcel6.classfile.Utility;
-import org.apache.commons.bcel6.verifier.structurals.LocalVariables;
-import org.apache.commons.bcel6.verifier.structurals.OperandStack;
 
 /**
  * Abstract super class for all possible java types, namely basic types

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/Class2HTML.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/Class2HTML.java?rev=1696799&r1=1696798&r2=1696799&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/Class2HTML.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/Class2HTML.java
Thu Aug 20 14:42:04 2015
@@ -95,7 +95,7 @@ public class Class2HTML {
     }
 
 
-    public static void main( String argv[] ) {
+    public static void main( String[] argv ) {
         String[] file_name = new String[argv.length];
         int files = 0;
         ClassParser parser = null;

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassPath.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassPath.java?rev=1696799&r1=1696798&r2=1696799&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassPath.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassPath.java Thu
Aug 20 14:42:04 2015
@@ -348,7 +348,7 @@ public class ClassPath {
         return getClassFile(name, suffix).getPath();
     }
 
-    private static abstract class PathEntry {
+    private abstract static class PathEntry {
 
         abstract ClassFile getClassFile( String name, String suffix ) throws IOException;
         abstract URL getResource(String name);

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/InstructionFinder.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/InstructionFinder.java?rev=1696799&r1=1696798&r2=1696799&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/InstructionFinder.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/InstructionFinder.java
Thu Aug 20 14:42:04 2015
@@ -28,7 +28,6 @@ import java.util.regex.Pattern;
 
 import org.apache.commons.bcel6.Constants;
 import org.apache.commons.bcel6.generic.ClassGenException;
-import org.apache.commons.bcel6.generic.Instruction;
 import org.apache.commons.bcel6.generic.InstructionHandle;
 import org.apache.commons.bcel6.generic.InstructionList;
 

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/GraphicalVerifier.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/GraphicalVerifier.java?rev=1696799&r1=1696798&r2=1696799&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/GraphicalVerifier.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/GraphicalVerifier.java
Thu Aug 20 14:42:04 2015
@@ -34,7 +34,7 @@ public class GraphicalVerifier {
 
 
     /** Constructor. */
-    public GraphicalVerifier() {
+    private GraphicalVerifier() {
         VerifierAppFrame frame = new VerifierAppFrame();
         //Frames �berpr�fen, die voreingestellte Gr��e haben
         //Frames packen, die nutzbare bevorzugte Gr��eninformationen enthalten,
z.B. aus ihrem Layout



Mime
View raw message