Author: sisbell Date: Wed Apr 29 21:30:16 2009 New Revision: 769945 URL: http://svn.apache.org/viewvc?rev=769945&view=rev Log: Moved interp tag to private class (small and only used one place). Added final to fields in ProjectUri. Since this is only used by DefaultInterpolator, don't care if values are inlined during compile
Removed: maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/interpolator/PomInterpolatorTag.java Modified: maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/interpolator/DefaultInterpolator.java maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/interpolator/InterpolatorProperty.java maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/interpolator/ProjectUri.java Modified: maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/interpolator/DefaultInterpolator.java URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/interpolator/DefaultInterpolator.java?rev=769945&r1=769944&r2=769945&view=diff ============================================================================== --- maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/interpolator/DefaultInterpolator.java (original) +++ maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/interpolator/DefaultInterpolator.java Wed Apr 29 21:30:16 2009 @@ -789,5 +789,11 @@ uris = new LinkedList<String>( uris.subList( 0, depth ) ); } } + + private static enum PomInterpolatorTag + { + PROJECT_PROPERTIES, + EXECUTION_PROPERTIES + } } Modified: maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/interpolator/InterpolatorProperty.java URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/interpolator/InterpolatorProperty.java?rev=769945&r1=769944&r2=769945&view=diff ============================================================================== --- maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/interpolator/InterpolatorProperty.java (original) +++ maven/components/branches/MNG-2766/maven-model-builder/src/main/java/org/apache/maven/model/interpolator/InterpolatorProperty.java Wed Apr 29 21:30:16 2009 @@ -99,20 +99,6 @@ { this.tag = tag; } - public static List<InterpolatorProperty> toInterpolatorProperties( Map<String, String> properties, String tag ) - { - if( properties == null ) - { - throw new IllegalArgumentException( "properties: null" ); - } - - List<InterpolatorProperty> interpolatorProperties = new ArrayList<InterpolatorProperty>(); - for ( Map.Entry<String, String> e : properties.entrySet() ) - { - interpolatorProperties.add( new InterpolatorProperty( "${" + e.getKey() +"}", e.getValue(), tag) ); - } - return interpolatorProperties; - } /** * Returns true if key values match, otherwise returns false. @@ -156,20 +142,5 @@ return "Key = " + key + ", Value = " + value + ", Hash = " + this.hashCode(); } - - public static List<InterpolatorProperty> toInterpolatorProperties( Properties properties, String tag ) - { - if( properties == null ) - { - throw new IllegalArgumentException( "properties: null" ); - } - - List<InterpolatorProperty> interpolatorProperties = new ArrayList<InterpolatorProperty>(); - for ( Map.Entry<Object, Object> e : properties.entrySet() ) - { - interpolatorProperties.add( new InterpolatorProperty( "${" + e.getKey() +"}", (String) e.getValue(), tag) ); - } - return interpolatorProperties; - } }