prevent NPE

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1345396 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-06-01 23:47:14 +00:00
parent 1141aca7ec
commit 096a4c0ed1
1 changed files with 5 additions and 0 deletions

View File

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