You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2016/06/11 01:22:52 UTC

svn commit: r1747832 - /commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Utility.java

Author: sebb
Date: Sat Jun 11 01:22:51 2016
New Revision: 1747832

URL: http://svn.apache.org/viewvc?rev=1747832&view=rev
Log:
Use exception to report the stacktrace etc

Modified:
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Utility.java

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Utility.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Utility.java?rev=1747832&r1=1747831&r2=1747832&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Utility.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Utility.java Sat Jun 11 01:22:51 2016
@@ -160,9 +160,7 @@ public abstract class Utility {
                 }
             }
         } catch (IOException e) {
-            System.out.println(buf.toString());
-            e.printStackTrace();
-            throw new ClassFormatException("Byte code error: " + e, e);
+            throw new ClassFormatException("Byte code error: " + buf.toString(), e);
         }
         return buf.toString();
     }
@@ -442,7 +440,7 @@ public abstract class Utility {
                                 buf.append(bytes.readInt());
                                 break;
                             default: // Never reached
-                            	throw new IllegalStateException("Unreachable default case reached!");
+                                throw new IllegalStateException("Unreachable default case reached!");
                         }
                     }
                 }