Deal with use case not in OSGi runtime
authorMathieu Baudier <mbaudier@argeo.org>
Mon, 10 Dec 2012 12:54:30 +0000 (12:54 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Mon, 10 Dec 2012 12:54:30 +0000 (12:54 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@5943 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

server/runtime/org.argeo.server.jackrabbit/src/main/java/org/argeo/jackrabbit/JackrabbitWrapper.java

index 1505b1cfe9763d50f25c69e7cdda849fe3b1e9f9..4807f0951d574375bcdb142552907261678f9c0e 100644 (file)
@@ -301,6 +301,9 @@ public class JackrabbitWrapper extends JcrRepositoryWrapper implements
         */
        /** Find which OSGi bundle provided the data model resource */
        protected Bundle findDataModelBundle(String resUrl) {
+               if (bundleContext == null)
+                       return null;
+
                if (resUrl.startsWith("/"))
                        resUrl = resUrl.substring(1);
                String pkg = resUrl.substring(0, resUrl.lastIndexOf('/')).replace('/',