Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
SUSE:SLE-15-SP2:Update
xmvn-connector-aether
0001-Prefer-namespaced-metadata-when-duplicates...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Prefer-namespaced-metadata-when-duplicates-are-found.patch of Package xmvn-connector-aether
From 1474fd57e606bdb00417524a7b648f7841b014c8 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski <mizdebsk@redhat.com> Date: Fri, 28 Jun 2019 12:15:23 +0200 Subject: [PATCH 1/3] Prefer namespaced metadata when duplicates are found --- .../metadata/impl/DefaultMetadataResult.java | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/xmvn-core/src/main/java/org/fedoraproject/xmvn/metadata/impl/DefaultMetadataResult.java b/xmvn-core/src/main/java/org/fedoraproject/xmvn/metadata/impl/DefaultMetadataResult.java index c8b63214..67bafef5 100644 --- a/xmvn-core/src/main/java/org/fedoraproject/xmvn/metadata/impl/DefaultMetadataResult.java +++ b/xmvn-core/src/main/java/org/fedoraproject/xmvn/metadata/impl/DefaultMetadataResult.java @@ -94,23 +94,28 @@ class DefaultMetadataResult } ArtifactMetadata otherMetadata = artifactMap.get( artifact ); - if ( otherMetadata != null ) + + if ( otherMetadata == null ) + { + artifactMap.put( artifact, metadata ); + continue; + } + + duplicateArtifacts.add( artifact ); + + if ( ignoreDuplicates ) { - duplicateArtifacts.add( artifact ); - - if ( ignoreDuplicates ) - { - artifactMap.remove( artifact ); - logger.warn( "Ignoring metadata for artifact {} as it has duplicate metadata", artifact ); - continue; - } - else - { - logger.warn( "Duplicate metadata for artifact {}", artifact ); - } + artifactMap.remove( artifact ); + logger.warn( "Ignoring metadata for artifact {} as it has duplicate metadata", artifact ); + continue; } - artifactMap.put( artifact, metadata ); + logger.warn( "Duplicate metadata for artifact {}", artifact ); + + if ( otherMetadata.getNamespace().isEmpty() || !metadata.getNamespace().isEmpty() ) + { + artifactMap.put( artifact, metadata ); + } } } -- 2.21.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor