You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by ng...@apache.org on 2008/07/13 13:38:32 UTC
svn commit: r676302 -
/mina/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/EncryptUtils.java
Author: ngn
Date: Sun Jul 13 04:38:31 2008
New Revision: 676302
URL: http://svn.apache.org/viewvc?rev=676302&view=rev
Log:
Do not eat exceptions, even if they should never occur
Modified:
mina/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/EncryptUtils.java
Modified: mina/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/EncryptUtils.java
URL: http://svn.apache.org/viewvc/mina/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/EncryptUtils.java?rev=676302&r1=676301&r2=676302&view=diff
==============================================================================
--- mina/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/EncryptUtils.java (original)
+++ mina/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/EncryptUtils.java Sun Jul 13 04:38:31 2008
@@ -60,7 +60,8 @@
result = encrypt(source, "MD5");
}
catch(NoSuchAlgorithmException ex) {
- ex.printStackTrace();
+ // this should never happen
+ throw new RuntimeException(ex);
}
return result;
}
@@ -78,7 +79,8 @@
result = encrypt(source, "SHA");
}
catch(NoSuchAlgorithmException ex) {
- ex.printStackTrace();
+ // this should never happen
+ throw new RuntimeException(ex);
}
return result;
}