directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r694723 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java
Date Fri, 12 Sep 2008 16:11:35 GMT
Author: pamarcelot
Date: Fri Sep 12 09:11:34 2008
New Revision: 694723

URL: http://svn.apache.org/viewvc?rev=694723&view=rev
Log:
Fixed a bug when the method was used with objects from the "Entry" API.

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java?rev=694723&r1=694722&r2=694723&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java
Fri Sep 12 09:11:34 2008
@@ -36,6 +36,9 @@
 
 import javax.naming.InvalidNameException;
 
+import org.apache.directory.shared.ldap.entry.client.ClientBinaryValue;
+import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
+
 
 /**
  * Various string manipulation methods that are more efficient then chaining
@@ -1036,11 +1039,19 @@
         {
             if ( object instanceof String )
             {
-                return (String)object;
+                return (String) object;
             }
             else if ( object instanceof byte[] )
             {
-                return dumpBytes( (byte[])object );
+                return dumpBytes( ( byte[] ) object );
+            }
+            else if ( object instanceof ClientStringValue )
+            {
+                return ( ( ClientStringValue ) object ).get();
+            }
+            else if ( object instanceof ClientBinaryValue )
+            {
+                return dumpBytes( ( ( ClientBinaryValue ) object ).get() );
             }
             else
             {



Mime
View raw message