directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1728369 - in /directory/shared/trunk/ldap/model/src: main/java/org/apache/directory/api/ldap/model/name/Dn.java test/java/org/apache/directory/api/ldap/model/name/DnSerializationTest.java
Date Wed, 03 Feb 2016 20:27:50 GMT
Author: elecharny
Date: Wed Feb  3 20:27:49 2016
New Revision: 1728369

URL: http://svn.apache.org/viewvc?rev=1728369&view=rev
Log:
Patch for DIRAPI-265 provided by Gerald Turner applied

Modified:
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Dn.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/name/DnSerializationTest.java

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Dn.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Dn.java?rev=1728369&r1=1728368&r2=1728369&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Dn.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Dn.java
Wed Feb  3 20:27:49 2016
@@ -1441,6 +1441,8 @@ public class Dn implements Iterable<Rdn>
             normName = upName;
         }
 
+        bytes = Strings.getBytesUtf8Ascii( normName );
+        
         // Read the RDNs. Is it's null, the number will be -1.
         int nbRdns = in.readInt();
 

Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/name/DnSerializationTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/name/DnSerializationTest.java?rev=1728369&r1=1728368&r2=1728369&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/name/DnSerializationTest.java
(original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/name/DnSerializationTest.java
Wed Feb  3 20:27:49 2016
@@ -21,6 +21,7 @@ package org.apache.directory.api.ldap.mo
 
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
@@ -111,5 +112,6 @@ public class DnSerializationTest
         assertEquals( dn1, dn2 );
         assertEquals( "Cn = Doe", dn2.getName() );
         assertEquals( "cn=Doe", dn2.getNormName() );
+        assertNotNull( Dn.getBytes( dn2 ) );
     }
 }



Mime
View raw message