james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mwiederk...@apache.org
Subject svn commit: r804985 - /james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/DecoderUtil.java
Date Mon, 17 Aug 2009 13:55:37 GMT
Author: mwiederkehr
Date: Mon Aug 17 13:55:37 2009
New Revision: 804985

URL: http://svn.apache.org/viewvc?rev=804985&view=rev
Log:
throw IllegalStateException in should-never-happen block

Modified:
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/DecoderUtil.java

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/DecoderUtil.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/DecoderUtil.java?rev=804985&r1=804984&r2=804985&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/DecoderUtil.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/DecoderUtil.java Mon
Aug 17 13:55:37 2009
@@ -54,10 +54,9 @@
                 baos.write(b);
             }
         } catch (IOException e) {
-            /*
-             * This should never happen!
-             */
+            // This should never happen!
             log.error(e);
+            throw new IllegalStateException(e);
         }
         
         return baos.toByteArray();
@@ -83,10 +82,9 @@
                 baos.write(b);
             }
         } catch (IOException e) {
-            /*
-             * This should never happen!
-             */
+            // This should never happen!
             log.error(e);
+            throw new IllegalStateException(e);
         }
         
         return baos.toByteArray();



Mime
View raw message