directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1733890 - /directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/UsageEnum.java
Date Mon, 07 Mar 2016 09:28:29 GMT
Author: elecharny
Date: Mon Mar  7 09:28:29 2016
New Revision: 1733890

URL: http://svn.apache.org/viewvc?rev=1733890&view=rev
Log:
Made the getUsage() method more solid (using equalsIgonre case instead of equals).

Note that the fallback is really ugly, but we must keep it otherwise it would break the old
installations.

The schemas will be fixed to not contain any of the lower cased usage values.

Modified:
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/UsageEnum.java

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/UsageEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/UsageEnum.java?rev=1733890&r1=1733889&r2=1733890&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/UsageEnum.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/UsageEnum.java
Mon Mar  7 09:28:29 2016
@@ -88,19 +88,19 @@ public enum UsageEnum
         }
         catch ( IllegalArgumentException iae )
         {
-            if ( "directoryOperation".equals( usage ) )
+            if ( "directoryOperation".equalsIgnoreCase( usage ) )
             {
                 return DIRECTORY_OPERATION;
             }
-            else if ( "distributedOperation".equals( usage ) )
+            else if ( "distributedOperation".equalsIgnoreCase( usage ) )
             {
                 return DISTRIBUTED_OPERATION;
             }
-            else if ( "dSAOperation".equals( usage ) )
+            else if ( "dSAOperation".equalsIgnoreCase( usage ) )
             {
                 return DSA_OPERATION;
             }
-            else if ( "userApplications".equals( usage ) )
+            else if ( "userApplications".equalsIgnoreCase( usage ) )
             {
                 return USER_APPLICATIONS;
             }



Mime
View raw message