private Map getHttpHeaders()

in src/main/java/org/apache/maven/resolver/internal/ant/AntRepoSys.java [310:324]


    private Map<String, String> getHttpHeaders( Xpp3Dom dom )
    {
        final Map<String, String> headers = new HashMap<>();
        for ( int i = 0; i < dom.getChildCount(); i++ )
        {
            Xpp3Dom child = dom.getChild( i );
            Xpp3Dom name = child.getChild( "name" );
            Xpp3Dom value = child.getChild( "value" );
            if ( name != null && name.getValue() != null )
            {
                headers.put( name.getValue(), ( value != null ) ? value.getValue() : null );
            }
        }
        return Collections.unmodifiableMap( headers );
    }