You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2005/12/21 00:48:08 UTC

svn commit: r358151 - /directory/shared/ldap/branches/DN-refactoring/common/src/main/java/org/apache/ldap/common/name/AttributeTypeAndValue.java

Author: elecharny
Date: Tue Dec 20 15:47:59 2005
New Revision: 358151

URL: http://svn.apache.org/viewcvs?rev=358151&view=rev
Log:
- Fixed a little typo
- Fixed the normaliztion method

Modified:
    directory/shared/ldap/branches/DN-refactoring/common/src/main/java/org/apache/ldap/common/name/AttributeTypeAndValue.java

Modified: directory/shared/ldap/branches/DN-refactoring/common/src/main/java/org/apache/ldap/common/name/AttributeTypeAndValue.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/common/src/main/java/org/apache/ldap/common/name/AttributeTypeAndValue.java?rev=358151&r1=358150&r2=358151&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/common/src/main/java/org/apache/ldap/common/name/AttributeTypeAndValue.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/common/src/main/java/org/apache/ldap/common/name/AttributeTypeAndValue.java Tue Dec 20 15:47:59 2005
@@ -18,7 +18,7 @@
 
 import javax.naming.InvalidNameException;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.asn1.codec.util.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -39,7 +39,7 @@
  */
 public class AttributeTypeAndValue implements Cloneable, Comparable
 {
-    /** The LoggerFactory used by this Interceptor */
+    /** The LoggerFactory used by this class */
     private static Logger log = LoggerFactory.getLogger( AttributeTypeAndValue.class );
 
     /** The Name type */
@@ -148,11 +148,15 @@
      */
     public void setValueNormalized( String value )
     {
-        this.value = StringUtils.trim( value );
+    	String newValue = StringUtils.trim( value );
 
-        if ( StringUtils.isEmpty( value ) )
+        if ( StringUtils.isEmpty( newValue ) )
         {
             this.value = "";
+        }
+        else
+        {
+        	this.value = newValue; 
         }
     }