diff options
author | Martin Stockhammer <martin_s@apache.org> | 2019-08-29 07:51:16 +0200 |
---|---|---|
committer | Martin Stockhammer <martin_s@apache.org> | 2019-08-29 07:51:16 +0200 |
commit | ee382e76f4cc18a2b7cd9f1aa5590a53b2b83051 (patch) | |
tree | 35e6381b5a8bb1113d27bdd1829033ed9a256c9c /archiva-modules/plugins/metadata-store-jcr | |
parent | a0c3051b16947b84623dec004314a8aedb38566a (diff) | |
download | archiva-ee382e76f4cc18a2b7cd9f1aa5590a53b2b83051.tar.gz archiva-ee382e76f4cc18a2b7cd9f1aa5590a53b2b83051.zip |
Fixing MPE
Diffstat (limited to 'archiva-modules/plugins/metadata-store-jcr')
-rw-r--r-- | archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java | 5 |
1 files changed, 4 insertions, 1 deletions
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 d650abb86..1ed5841ed 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 @@ -313,6 +313,7 @@ public class JcrMetadataRepository n.setProperty("systemPath", dependency.getSystemPath()); n.setProperty("optional", dependency.isOptional()); n.setProperty("projectId", dependency.getProjectId()); + // TODO: Fixig Node refNode = findArtifactNode(jcrSession, dependency.getNamespace(), dependency.getProjectId(), dependency.getVersion(), dependency.getArtifactId()); if (refNode!=null) { @@ -1646,7 +1647,9 @@ public class JcrMetadataRepository private Node findArtifactNode(Session jcrSession, String namespace, String projectId, String projectVersion, String id) throws RepositoryException { - + if (namespace==null || projectId==null||projectVersion==null||id==null) { + return null; + } Node root = jcrSession.getRootNode(); Node node = JcrUtils.getOrAddNode(root, "repositories"); for (Node n : JcrUtils.getChildNodes(node)) { |