commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1747832 - /commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Utility.java
Date Sat, 11 Jun 2016 01:22:52 GMT
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!");
                         }
                     }
                 }



Mime
View raw message