directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r485958 - /directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/UsageEnum.java
Date Tue, 12 Dec 2006 00:02:58 GMT
Author: elecharny
Date: Mon Dec 11 16:02:58 2006
New Revision: 485958

URL: http://svn.apache.org/viewvc?view=rev&rev=485958
Log:
Added a defensive test against NPE

Modified:
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/UsageEnum.java

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/UsageEnum.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/UsageEnum.java?view=diff&rev=485958&r1=485957&r2=485958
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/UsageEnum.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/UsageEnum.java
Mon Dec 11 16:02:58 2006
@@ -117,6 +117,11 @@
      */
     public static String render( UsageEnum usage )
     {
+        if ( usage == null)
+        {
+            return "";
+        }
+        
         switch ( usage )
         {
             case DIRECTORY_OPERATION    : return "directoryOperation";



Mime
View raw message