]> source.dussan.org Git - archiva.git/commitdiff
prevent NPE
authorOlivier Lamy <olamy@apache.org>
Fri, 1 Jun 2012 23:47:14 +0000 (23:47 +0000)
committerOlivier Lamy <olamy@apache.org>
Fri, 1 Jun 2012 23:47:14 +0000 (23:47 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1345396 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java

index 2665e86794025cdd1cc549aff855a21bcbf51083..0ad272528c3ec3212a24be39c8ae053095e8af13 100644 (file)
@@ -413,6 +413,11 @@ public class JcrMetadataRepository
             Node root = getJcrSession().getRootNode();
             Node node = root.getNode( getFacetPath( repositoryId, facetId, name ) );
 
+            if ( metadataFacetFactories == null )
+            {
+                return metadataFacet;
+            }
+
             MetadataFacetFactory metadataFacetFactory = metadataFacetFactories.get( facetId );
             if ( metadataFacetFactory != null )
             {