directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r944578 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControl.java
Date Sat, 15 May 2010 06:27:12 GMT
Author: felixk
Date: Sat May 15 06:27:12 2010
New Revision: 944578

URL: http://svn.apache.org/viewvc?rev=944578&view=rev
Log:
USELESS_STRING: Invocation of toString on an array (DMI_INVOKING_TOSTRING_ON_ARRAY)

The code invokes toString on an array, which will generate a fairly useless result such as
[C@16f0472. Consider using Arrays.toString to convert the array into a readable String that
gives the contents of the array. See Programming Puzzlers, chapter 3, puzzle 12. 

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControl.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControl.java?rev=944578&r1=944577&r2=944578&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControl.java
Sat May 15 06:27:12 2010
@@ -21,6 +21,7 @@ package org.apache.directory.shared.ldap
 
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
@@ -589,7 +590,7 @@ public class SyncInfoValueControl extend
                             sb.append( ", " );
                         }
                         
-                        sb.append( syncUUID );
+                        sb.append( Arrays.toString ( syncUUID ) );
                     }
                     
                     sb.append( '\n' );



Mime
View raw message