directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r920081 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java
Date Sun, 07 Mar 2010 20:06:56 GMT
Author: seelmann
Date: Sun Mar  7 20:06:56 2010
New Revision: 920081

URL: http://svn.apache.org/viewvc?rev=920081&view=rev
Log:
Wrap UnsupportedEncodingException into RuntimeExcption 

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java?rev=920081&r1=920080&r2=920081&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java
Sun Mar  7 20:06:56 2010
@@ -1470,7 +1470,8 @@
             }
             catch ( UnsupportedEncodingException uee )
             {
-                return NOT_EQUAL;
+                // if this happens something is really strange
+                throw new RuntimeException( uee );
             }
         }
     }
@@ -3103,7 +3104,8 @@
         }
         catch ( UnsupportedEncodingException uee )
         {
-            return "";
+            // if this happens something is really strange
+            throw new RuntimeException( uee );
         }
     }
 
@@ -3128,7 +3130,8 @@
         }
         catch ( UnsupportedEncodingException uee )
         {
-            return "";
+            // if this happens something is really strange
+            throw new RuntimeException( uee );
         }
     }
 
@@ -3154,7 +3157,8 @@
         }
         catch ( UnsupportedEncodingException uee )
         {
-            return "";
+            // if this happens something is really strange
+            throw new RuntimeException( uee );
         }
     }
 
@@ -3178,8 +3182,8 @@
         }
         catch ( UnsupportedEncodingException uee )
         {
-            return new byte[]
-                {};
+            // if this happens something is really strange
+            throw new RuntimeException( uee );
         }
     }
 



Mime
View raw message