]> source.dussan.org Git - archiva.git/commitdiff
MRM-220 Guard against null groupIds in metadata during conversion of legacy repositories
authorJason van Zyl <jvanzyl@apache.org>
Sun, 5 Nov 2006 04:21:19 +0000 (04:21 +0000)
committerJason van Zyl <jvanzyl@apache.org>
Sun, 5 Nov 2006 04:21:19 +0000 (04:21 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@471359 13f79535-47bb-0310-9956-ffa450edef68

archiva-converter/src/main/java/org/apache/maven/archiva/converter/DefaultRepositoryConverter.java

index 5271e24c5fa859797658c66975a59002d6279740..cbc671c9b5ef535599c7853ab5b34fee6fbbe4ef 100644 (file)
@@ -294,14 +294,14 @@ public class DefaultRepositoryConverter
 
         boolean result = true;
 
-        if ( !metadata.getGroupId().equals( artifact.getGroupId() ) )
+        if ( metadata.getGroupId() == null || !metadata.getGroupId().equals( artifact.getGroupId() ) )
         {
             addFailure( reporter, artifact, groupIdKey );
             result = false;
         }
         if ( !repositoryMetadata.storedInGroupDirectory() )
         {
-            if ( !metadata.getArtifactId().equals( artifact.getArtifactId() ) )
+            if ( metadata.getGroupId() == null || !metadata.getArtifactId().equals( artifact.getArtifactId() ) )
             {
                 addFailure( reporter, artifact, artifactIdKey );
                 result = false;