[exo-jcr-commits] exo-jcr SVN: r2782 - jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/script/groovy.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Jul 14 04:17:47 EDT 2010


Author: aparfonov
Date: 2010-07-14 04:17:47 -0400 (Wed, 14 Jul 2010)
New Revision: 2782

Modified:
   jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/script/groovy/GroovyScript2RestLoader.java
Log:
EXOJCR-482

Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/script/groovy/GroovyScript2RestLoader.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/script/groovy/GroovyScript2RestLoader.java	2010-07-14 07:13:40 UTC (rev 2781)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/script/groovy/GroovyScript2RestLoader.java	2010-07-14 08:17:47 UTC (rev 2782)
@@ -1544,16 +1544,23 @@
       URL[] res = new URL[src.length];
       for (int i = 0; i < src.length; i++)
       {
-         String ref = src[i].getRef();
-         if (ref == null)
+         if ("jcr".equals(src[i].getProtocol()))
          {
-            ref = "/";
+            String ref = src[i].getRef();
+            if (ref == null)
+            {
+               ref = "/";
+            }
+            else if (ref.charAt(ref.length() - 1) != '/')
+            {
+               ref = ref + "/";
+            }
+            res[i] = new URL(src[i], "#" + ref);
          }
-         else if (ref.charAt(ref.length() - 1) != '/')
+         else
          {
-            ref = ref + "/";
+            res[i] = src[i];
          }
-         res[i] = new URL(src[i], "#" + ref);
       }
       return res;
    }



More information about the exo-jcr-commits mailing list