bundles/org.eclipse.packagedrone.repo/src/org/eclipse/packagedrone/repo/MetaKeys.java
public static Map<MetaKey, String> union ( final Map<MetaKey, String> providedMetaData, final Map<MetaKey, String> extractedMetaData )
    {
        final int size1 = providedMetaData != null ? providedMetaData.size () : 0;
        final int size2 = extractedMetaData != null ? extractedMetaData.size () : 0;

        if ( size1 + size2 == 0 )
        {
            return Collections.emptyMap ();
        }

        final Map<MetaKey, String> result = new HashMap<> ( size1 + size2 );

        if ( extractedMetaData != null )
        {
            result.putAll ( extractedMetaData );
        }

        // provided will override
        if ( providedMetaData != null )
        {
            result.putAll ( providedMetaData );
        }

        return Collections.unmodifiableMap ( result );
    }
public static Map<MetaKey, String> union ( final Map<MetaKey, String> providedMetaData, final Map<MetaKey, String> extractedMetaData )
    {
        final int size1 = providedMetaData != null ? providedMetaData.size () : 0;
        final int size2 = extractedMetaData != null ? extractedMetaData.size () : 0;

        if ( size1 + size2 == 0 )
        {
            return Collections.emptyMap ();
        }

        final Map<MetaKey, String> result = new HashMap<> ( size1 + size2 );

        if ( extractedMetaData != null )
        {
            result.putAll ( extractedMetaData );
        }

        // provided will override
        if ( providedMetaData != null )
        {
            result.putAll ( providedMetaData );
        }

        return Collections.unmodifiableMap ( result );
    }
Return an unmodifiable map of provided and extracted meta data

@param providedMetaData
the provided meta data, or code {@code null}
@param extractedMetaData
the extracted meta data, or code {@code null}
@return the union of provided and extracted meta data, never returns
{@code null}