You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2016/05/05 20:28:35 UTC
maven git commit: Code polishing o Replaced
Collections.unmodifiableList() with google ImmutableSet to keep the original
Set type.
Repository: maven
Updated Branches:
refs/heads/master 6d67fb246 -> d3da8c209
Code polishing
o Replaced Collections.unmodifiableList() with
google ImmutableSet to keep the original Set type.
Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/d3da8c20
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/d3da8c20
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/d3da8c20
Branch: refs/heads/master
Commit: d3da8c20903275a64b550c5c481f2ac7d38d0170
Parents: 6d67fb2
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Thu May 5 22:27:29 2016 +0200
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Thu May 5 22:27:29 2016 +0200
----------------------------------------------------------------------
.../AbstractStringBasedModelInterpolator.java | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven/blob/d3da8c20/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
----------------------------------------------------------------------
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 2bd8183..1f3ec18 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
@@ -22,10 +22,10 @@ package org.apache.maven.model.interpolation;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Properties;
+import java.util.Set;
import org.apache.maven.model.Model;
import org.apache.maven.model.building.ModelBuildingRequest;
@@ -48,6 +48,8 @@ import org.codehaus.plexus.interpolation.PrefixedValueSourceWrapper;
import org.codehaus.plexus.interpolation.RecursionInterceptor;
import org.codehaus.plexus.interpolation.ValueSource;
+import com.google.common.collect.ImmutableSet;
+
/**
* Use a regular expression search to find and resolve expressions within the POM.
*
@@ -64,11 +66,10 @@ public abstract class AbstractStringBasedModelInterpolator
// sure interpolation of the directories below uses translated paths.
// Afterward, we'll double back and translate any paths that weren't covered during interpolation via the
// code below...
- private static final Collection<String> TRANSLATED_PATH_EXPRESSIONS =
- Collections.unmodifiableList( Arrays.asList( "build.directory", "build.outputDirectory",
- "build.testOutputDirectory", "build.sourceDirectory",
- "build.testSourceDirectory", "build.scriptSourceDirectory",
- "reporting.outputDirectory" ) );
+ private static final Set<String> TRANSLATED_PATH_EXPRESSIONS =
+ ImmutableSet.of( "build.directory", "build.outputDirectory", "build.testOutputDirectory",
+ "build.sourceDirectory", "build.testSourceDirectory", "build.scriptSourceDirectory",
+ "reporting.outputDirectory" );
@Requirement
private PathTranslator pathTranslator;