directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r477219 - /directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/DerefAliasesEnum.java
Date Mon, 20 Nov 2006 15:22:32 GMT
Author: elecharny
Date: Mon Nov 20 07:22:31 2006
New Revision: 477219

URL: http://svn.apache.org/viewvc?view=rev&rev=477219
Log:
Modified the getEnum() method to accept only DerefAliasEnum stored values

Modified:
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/DerefAliasesEnum.java

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/DerefAliasesEnum.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/DerefAliasesEnum.java?view=diff&rev=477219&r1=477218&r2=477219
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/DerefAliasesEnum.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/DerefAliasesEnum.java
Mon Nov 20 07:22:31 2006
@@ -73,16 +73,16 @@
     public static final String JNDI_DEREF_ALIAS_PROP = "java.naming.ldap.derefAliases";
 
     /** Alias handling mode name that treats aliases like entries */
-    public static final String NEVER_DEREF_ALIASES_NAME = "never";
+    //public static final String NEVER_DEREF_ALIASES_NAME = "never";
 
     /** Alias handling mode name that dereferences only when searching */
-    public static final String DEREF_IN_SEARCHING_NAME = "searching";
+    //public static final String DEREF_IN_SEARCHING_NAME = "searching";
 
     /** Alias handling mode name that dereferences only in finding the base */
-    public static final String DEREF_FINDING_BASE_OBJ_NAME = "finding";
+    //public static final String DEREF_FINDING_BASE_OBJ_NAME = "finding";
 
     /** Alias handling mode name that dereferences always */
-    public static final String DEREF_ALWAYS_NAME = "always";
+    //public static final String DEREF_ALWAYS_NAME = "always";
 
     /**
      * Gets the enumeration from by extracting the value for the JNDI LDAP
@@ -94,17 +94,18 @@
      *            java.naming.ldap.derefAliases property
      * @return the enumeration for the environment
      */
-    public static DerefAliasesEnum getEnum( Map env )
+    public static DerefAliasesEnum getEnum( Map<String, DerefAliasesEnum> env )
     {
-        String property = ( String ) env.get( JNDI_DEREF_ALIAS_PROP );
+        DerefAliasesEnum property = env.get( JNDI_DEREF_ALIAS_PROP );
         
         if ( null == property )
         {
             return DEREF_ALWAYS;
         }
-        
-        DerefAliasesEnum result = valueOf( property );
-        return ( result == null ? DEREF_ALWAYS : result );
+        else
+        {
+            return property;
+        }
     }
     
     /**



Mime
View raw message