From 096a4c0ed1d0d4e82c8ebf276554b2663d54cdec Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Fri, 1 Jun 2012 23:47:14 +0000 Subject: [PATCH] prevent NPE git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1345396 13f79535-47bb-0310-9956-ffa450edef68 --- .../metadata/repository/jcr/JcrMetadataRepository.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java index 2665e8679..0ad272528 100644 --- a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java +++ b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java @@ -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 ) { -- 2.39.5