jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1182873 - /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
Date Thu, 13 Oct 2011 14:25:51 GMT
Author: mduerig
Date: Thu Oct 13 14:25:51 2011
New Revision: 1182873

URL: http://svn.apache.org/viewvc?rev=1182873&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP)
minor refactor

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java?rev=1182873&r1=1182872&r2=1182873&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
Thu Oct 13 14:25:51 2011
@@ -51,6 +51,7 @@ import org.apache.jackrabbit.spi.commons
 import org.apache.jackrabbit.spi.commons.QNodeDefinitionImpl;
 import org.apache.jackrabbit.spi.commons.batch.ConsolidatingChangeLog;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
+import org.apache.jackrabbit.spi.commons.util.Arrays;
 import org.apache.jackrabbit.spi.commons.util.Function1;
 import org.apache.jackrabbit.spi.commons.util.Iterators;
 import org.apache.jackrabbit.spi.commons.util.Predicate1;
@@ -180,12 +181,13 @@ public class RepositoryServiceImpl exten
         }
     }};
 
-    private static QValue[] toQValues(String[] strings) throws RepositoryException { // fixme
generalize to array map
-        QValue[] qValues = new QValue[strings.length];
-        for (int k = 0; k < strings.length; k++) {
-            qValues[k] = Values.objectToValue(strings[k]);
-        }
-        return qValues;
+    private static QValue[] toQValues(String[] strings) {
+        return Arrays.map(strings, new QValue[strings.length], new Function1<String, QValue>(){
+            @Override
+            public QValue apply(String s) throws Exception {
+                return Values.objectToValue(s);
+            }
+        });
     }
 
     private final MicroKernel microKernel;



Mime
View raw message