incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jus...@apache.org
Subject svn commit: r1070127 - /sling/trunk/testing/junit/scriptable/src/main/java/org/apache/sling/junit/scriptable/ScriptableTestsProvider.java
Date Sat, 12 Feb 2011 18:55:44 GMT
Author: justin
Date: Sat Feb 12 18:55:44 2011
New Revision: 1070127

URL: http://svn.apache.org/viewvc?rev=1070127&view=rev
Log:
fixing compilation error on JDK 5 - Arrays.copyOf() requires Java 6

Modified:
    sling/trunk/testing/junit/scriptable/src/main/java/org/apache/sling/junit/scriptable/ScriptableTestsProvider.java

Modified: sling/trunk/testing/junit/scriptable/src/main/java/org/apache/sling/junit/scriptable/ScriptableTestsProvider.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/junit/scriptable/src/main/java/org/apache/sling/junit/scriptable/ScriptableTestsProvider.java?rev=1070127&r1=1070126&r2=1070127&view=diff
==============================================================================
--- sling/trunk/testing/junit/scriptable/src/main/java/org/apache/sling/junit/scriptable/ScriptableTestsProvider.java
(original)
+++ sling/trunk/testing/junit/scriptable/src/main/java/org/apache/sling/junit/scriptable/ScriptableTestsProvider.java
Sat Feb 12 18:55:44 2011
@@ -100,7 +100,8 @@ public class ScriptableTestsProvider imp
         
         // Copy resource resolver paths and make sure they end with a /
         final String [] paths = resolver.getSearchPath();
-        allowedRoots = Arrays.copyOf(paths, paths.length);
+        allowedRoots = new String[paths.length];
+        System.arraycopy(paths, 0, allowedRoots, 0, paths.length);
         for(int i=0; i < allowedRoots.length; i++) {
             if(!allowedRoots[i].endsWith("/")) {
                 allowedRoots[i] += "/";



Mime
View raw message