commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1696806 - in /commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6: classfile/ verifier/statics/
Date Thu, 20 Aug 2015 15:06:07 GMT
Author: sebb
Date: Thu Aug 20 15:06:07 2015
New Revision: 1696806

URL: http://svn.apache.org/r1696806
Log:
Checkstyle

Modified:
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/BootstrapMethod.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/CodeException.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Constant.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantPool.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/FieldOrMethod.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/InnerClass.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/JavaClass.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LineNumber.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LocalVariable.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/MethodParameter.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapEntry.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapTableEntry.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapType.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/statics/Pass2Verifier.java

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/BootstrapMethod.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/BootstrapMethod.java?rev=1696806&r1=1696805&r2=1696806&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/BootstrapMethod.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/BootstrapMethod.java
Thu Aug 20 15:06:07 2015
@@ -162,6 +162,7 @@ public class BootstrapMethod implements
         try {
             return (BootstrapMethod) clone();
         } catch (CloneNotSupportedException e) {
+            // TODO should this throw?
         }
         return null;
     }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/CodeException.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/CodeException.java?rev=1696806&r1=1696805&r2=1696806&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/CodeException.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/CodeException.java
Thu Aug 20 15:06:07 2015
@@ -210,6 +210,7 @@ public final class CodeException impleme
         try {
             return (CodeException) clone();
         } catch (CloneNotSupportedException e) {
+            // TODO should this throw?
         }
         return null;
     }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Constant.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Constant.java?rev=1696806&r1=1696805&r2=1696806&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Constant.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Constant.java
Thu Aug 20 15:06:07 2015
@@ -104,6 +104,7 @@ public abstract class Constant implement
         try {
             return (Constant) super.clone();
         } catch (CloneNotSupportedException e) {
+            // TODO should this throw?
         }
         return null;
     }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantPool.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantPool.java?rev=1696806&r1=1696805&r2=1696806&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantPool.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantPool.java
Thu Aug 20 15:06:07 2015
@@ -365,6 +365,7 @@ public class ConstantPool implements Clo
                 }
             }
         } catch (CloneNotSupportedException e) {
+            // TODO should this throw?
         }
         return c;
     }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/FieldOrMethod.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/FieldOrMethod.java?rev=1696806&r1=1696805&r2=1696806&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/FieldOrMethod.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/FieldOrMethod.java
Thu Aug 20 15:06:07 2015
@@ -198,7 +198,9 @@ public abstract class FieldOrMethod exte
 
         try {
           c = (FieldOrMethod)clone();
-        } catch(CloneNotSupportedException e) {}
+        } catch(CloneNotSupportedException e) {
+            // ignored, but will cause NPE ...
+        }
 
         c.constant_pool    = constant_pool;
         c.attributes       = new Attribute[attributes.length];

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/InnerClass.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/InnerClass.java?rev=1696806&r1=1696805&r2=1696806&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/InnerClass.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/InnerClass.java
Thu Aug 20 15:06:07 2015
@@ -209,6 +209,7 @@ public final class InnerClass implements
         try {
             return (InnerClass) clone();
         } catch (CloneNotSupportedException e) {
+            // TODO should this throw?
         }
         return null;
     }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/JavaClass.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/JavaClass.java?rev=1696806&r1=1696805&r2=1696806&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/JavaClass.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/JavaClass.java
Thu Aug 20 15:06:07 2015
@@ -680,6 +680,7 @@ public class JavaClass extends AccessFla
                 c.attributes[i] = attributes[i].copy(c.constant_pool);
             }
         } catch (CloneNotSupportedException e) {
+            // TODO should this throw?
         }
         return c;
     }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LineNumber.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LineNumber.java?rev=1696806&r1=1696805&r2=1696806&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LineNumber.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LineNumber.java
Thu Aug 20 15:06:07 2015
@@ -141,6 +141,7 @@ public final class LineNumber implements
         try {
             return (LineNumber) clone();
         } catch (CloneNotSupportedException e) {
+            // TODO should this throw?
         }
         return null;
     }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LocalVariable.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LocalVariable.java?rev=1696806&r1=1696805&r2=1696806&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LocalVariable.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/LocalVariable.java
Thu Aug 20 15:06:07 2015
@@ -253,6 +253,7 @@ public final class LocalVariable impleme
         try {
             return (LocalVariable) clone();
         } catch (CloneNotSupportedException e) {
+            // TODO should this throw?
         }
         return null;
     }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/MethodParameter.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/MethodParameter.java?rev=1696806&r1=1696805&r2=1696806&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/MethodParameter.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/MethodParameter.java
Thu Aug 20 15:06:07 2015
@@ -108,6 +108,7 @@ public class MethodParameter implements
         try {
             return (MethodParameter) clone();
         } catch (CloneNotSupportedException e) {
+            // TODO should this throw?
         }
         return null;
     }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapEntry.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapEntry.java?rev=1696806&r1=1696805&r2=1696806&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapEntry.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapEntry.java
Thu Aug 20 15:06:07 2015
@@ -171,6 +171,7 @@ public final class StackMapEntry impleme
         try {
             return (StackMapEntry) clone();
         } catch (CloneNotSupportedException e) {
+            // TODO should this throw?
         }
         return null;
     }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapTableEntry.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapTableEntry.java?rev=1696806&r1=1696805&r2=1696806&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapTableEntry.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapTableEntry.java
Thu Aug 20 15:06:07 2015
@@ -240,6 +240,7 @@ public final class StackMapTableEntry im
         try {
             return (StackMapTableEntry) clone();
         } catch (CloneNotSupportedException e) {
+            // TODO should this throw?
         }
         return null;
     }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapType.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapType.java?rev=1696806&r1=1696805&r2=1696806&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapType.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/StackMapType.java
Thu Aug 20 15:06:07 2015
@@ -144,6 +144,7 @@ public final class StackMapType implemen
         try {
             return (StackMapType) clone();
         } catch (CloneNotSupportedException e) {
+            // TODO should this throw?
         }
         return null;
     }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/statics/Pass2Verifier.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/statics/Pass2Verifier.java?rev=1696806&r1=1696805&r2=1696806&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/statics/Pass2Verifier.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/statics/Pass2Verifier.java
Thu Aug 20 15:06:07 2015
@@ -307,7 +307,7 @@ public final class Pass2Verifier extends
      *
      * @see #constant_pool_entries_satisfy_static_constraints()
      */
-    private class CPESSC_Visitor extends org.apache.commons.bcel6.classfile.EmptyVisitor{
+    private final class CPESSC_Visitor extends org.apache.commons.bcel6.classfile.EmptyVisitor{
         private final Class<?> CONST_Class;
         /*
         private Class<?> CONST_Fieldref;
@@ -386,7 +386,7 @@ public final class Pass2Verifier extends
                 }
 
                 if (att instanceof SourceFile) {
-                    if (foundSourceFile == false) {
+                    if (!foundSourceFile) {
                         foundSourceFile = true;
                     } else {
                         throw new ClassConstraintException("A ClassFile structure (like '"
+ tostring(obj) + "') may have no more than one SourceFile attribute."); //vmspec2 4.7.7
@@ -394,7 +394,7 @@ public final class Pass2Verifier extends
                 }
 
                 if (att instanceof InnerClasses) {
-                    if (foundInnerClasses == false) {
+                    if (!foundInnerClasses) {
                         foundInnerClasses = true;
                     } else {
                         if (hasInnerClass) {
@@ -1202,7 +1202,7 @@ public final class Pass2Verifier extends
      * @see #constant_pool_entries_satisfy_static_constraints()
      * @see org.apache.commons.bcel6.classfile.ConstantCP
      */
-    private class FAMRAV_Visitor extends EmptyVisitor{
+    private final class FAMRAV_Visitor extends EmptyVisitor{
         private final ConstantPool cp; // ==jc.getConstantPool() -- only here to save typing
work.
         private FAMRAV_Visitor(JavaClass _jc){
             cp = _jc.getConstantPool();



Mime
View raw message