Skip to content
Permalink
Browse files
[MRM-2028] Fixing NPE on artifact removal
  • Loading branch information
effrafax committed Jan 6, 2022
1 parent 70bd7fd commit 512ff100d7404ab55f22042a625487dfa5913405
Showing 1 changed file with 3 additions and 4 deletions.
@@ -254,13 +254,12 @@ protected void purge( Set<Artifact> references )
if ( StringUtils.isNotBlank( reference.getClassifier( ) ) )
{
info.setClassifier( reference.getClassifier( ) );
metaRemovalList.put( info, artifactMetadata );
}
else
{
// metadataRepository.removeTimestampedArtifact( artifactMetadata, baseVersion );
metaRemovalList.put( info, artifactMetadata );
info.setClassifier( "" );
}
metaRemovalList.put( info, artifactMetadata );
}
}
}
@@ -356,7 +355,7 @@ private void removeArtifact( MetadataRepository metadataRepository, ArtifactInfo
(MavenArtifactFacet) artifactMetadata.getFacet(
MavenArtifactFacet.FACET_ID );

if ( StringUtils.equals( artifactInfo.classifier,
if ( mavenArtifactFacet != null && StringUtils.equals( artifactInfo.classifier,
mavenArtifactFacet.getClassifier( ) ) )
{
artifactMetadata.removeFacet( MavenArtifactFacet.FACET_ID );

0 comments on commit 512ff10

Please sign in to comment.