From a65f6d71f0f9d562c4871d3f2270a607801b6fa0 Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Tue, 2 Jun 2009 20:35:15 +0000 Subject: [PATCH] o Polished generics git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@781153 13f79535-47bb-0310-9956-ffa450edef68 --- .../AbstractStringBasedModelInterpolator.java | 17 ++++++++--------- .../StringSearchModelInterpolator.java | 12 ++++++------ 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java index adea9df625..65cb11641c 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java @@ -146,18 +146,17 @@ public abstract class AbstractStringBasedModelInterpolator return valueSources; } - protected List createPostProcessors( final Model model, final File projectDir, - final ModelBuildingRequest config ) + protected List createPostProcessors( final Model model, + final File projectDir, + final ModelBuildingRequest config ) { - return Collections.singletonList( (InterpolationPostProcessor) new PathTranslatingPostProcessor( - PROJECT_PREFIXES, - TRANSLATED_PATH_EXPRESSIONS, - projectDir, - pathTranslator ) ); + return Collections.singletonList( new PathTranslatingPostProcessor( PROJECT_PREFIXES, + TRANSLATED_PATH_EXPRESSIONS, projectDir, + pathTranslator ) ); } - protected String interpolateInternal( String src, List valueSources, - List postProcessors ) + protected String interpolateInternal( String src, List valueSources, + List postProcessors ) throws ModelInterpolationException { if ( src.indexOf( "${" ) < 0 ) diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java index 77f661bb08..10904f921c 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java @@ -60,8 +60,8 @@ public class StringSearchModelInterpolator { try { - List valueSources = createValueSources( model, projectDir, config ); - List postProcessors = createPostProcessors( model, projectDir, config ); + List valueSources = createValueSources( model, projectDir, config ); + List postProcessors = createPostProcessors( model, projectDir, config ); InterpolateObjectAction action = new InterpolateObjectAction( obj, valueSources, postProcessors, this ); @@ -92,11 +92,11 @@ public class StringSearchModelInterpolator private final LinkedList interpolationTargets; private final StringSearchModelInterpolator modelInterpolator; - private final List valueSources; - private final List postProcessors; + private final List valueSources; + private final List postProcessors; - public InterpolateObjectAction( Object target, List valueSources, - List postProcessors, + public InterpolateObjectAction( Object target, List valueSources, + List postProcessors, StringSearchModelInterpolator modelInterpolator ) { this.valueSources = valueSources;