directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r602714 - in /directory: apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/BinaryValue.java
Date Sun, 09 Dec 2007 18:25:54 GMT
Author: elecharny
Date: Sun Dec  9 10:25:46 2007
New Revision: 602714

URL: http://svn.apache.org/viewvc?rev=602714&view=rev
Log:
Revert from using a java 6 method (Arrays.copyOf), it was not compatible with JAVA 5.

Modified:
    directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/BinaryValue.java

Modified: directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java?rev=602714&r1=602713&r2=602714&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java
(original)
+++ directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java
Sun Dec  9 10:25:46 2007
@@ -192,7 +192,9 @@
             getNormalizedReference();
         }
 
-        return Arrays.copyOf( normalizedValue, normalizedValue.length );
+        byte[] copy = new byte[ normalizedValue.length ];
+        System.arraycopy( normalizedValue, 0, copy, 0, normalizedValue.length );
+        return copy;
     }
 
 

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/BinaryValue.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/BinaryValue.java?rev=602714&r1=602713&r2=602714&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/BinaryValue.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/BinaryValue.java
Sun Dec  9 10:25:46 2007
@@ -131,7 +131,8 @@
     {
         if ( wrapped != null )
         {
-            this.wrapped = Arrays.copyOf( wrapped, wrapped.length );
+            this.wrapped = new byte[ wrapped.length ];
+            System.arraycopy( wrapped, 0, this.wrapped, 0, wrapped.length );
         }
         else
         {
@@ -151,7 +152,8 @@
         
         if ( wrapped != null )
         {
-            cloned.wrapped = Arrays.copyOf(  wrapped, wrapped.length );
+            cloned.wrapped = new byte[ wrapped.length ];
+            System.arraycopy( wrapped, 0, cloned.wrapped, 0, wrapped.length );
         }
         
         return cloned;



Mime
View raw message