directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1041389 - /directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PrincipalName.java
Date Thu, 02 Dec 2010 14:32:44 GMT
Author: elecharny
Date: Thu Dec  2 14:32:43 2010
New Revision: 1041389

URL: http://svn.apache.org/viewvc?rev=1041389&view=rev
Log:
Catch some exception in the constructor and throw a Runtime exception instead

Modified:
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PrincipalName.java

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PrincipalName.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PrincipalName.java?rev=1041389&r1=1041388&r2=1041389&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PrincipalName.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PrincipalName.java
Thu Dec  2 14:32:43 2010
@@ -190,9 +190,16 @@ public class PrincipalName extends Abstr
      * @param nameString
      * @param nameType
      */
-    public PrincipalName( String nameString, int nameType ) throws ParseException
+    public PrincipalName( String nameString, int nameType )
     {
-        this.nameString = KerberosUtils.getNames( nameString );
+        try
+        {
+            this.nameString = KerberosUtils.getNames( nameString );
+        }
+        catch ( ParseException pe )
+        {
+            throw new IllegalArgumentException( pe );
+        }
         
         this.nameType = PrincipalNameType.getTypeByValue( nameType );
     }



Mime
View raw message