aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2017-05-10 10:14:30 +0200
committerJulien HENRY <henryju@yahoo.fr>2017-05-10 12:17:20 +0200
commite77dce4b8225466ec84da17df70d00ade58d7ebd (patch)
tree09ab07262774f50dcab75d4aab1157ee44c24b22 /src
parentd58ec2e929060b7dbcf3c8ac72816389e1b4e864 (diff)
downloadsonar-scanner-cli-e77dce4b8225466ec84da17df70d00ade58d7ebd.tar.gz
sonar-scanner-cli-e77dce4b8225466ec84da17df70d00ade58d7ebd.zip
SQSCANNER-40 Stop supporting $foo syntax3.0.2.768
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/sonarsource/scanner/cli/PropertyResolver.java2
-rw-r--r--src/test/java/org/sonarsource/scanner/cli/PropertyResolverTest.java6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/org/sonarsource/scanner/cli/PropertyResolver.java b/src/main/java/org/sonarsource/scanner/cli/PropertyResolver.java
index d92f7fe..71ac7a7 100644
--- a/src/main/java/org/sonarsource/scanner/cli/PropertyResolver.java
+++ b/src/main/java/org/sonarsource/scanner/cli/PropertyResolver.java
@@ -27,7 +27,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class PropertyResolver {
- private static final Pattern placeholderPattern = Pattern.compile("\\$\\{([\\w\\.]+)\\}|\\$([\\w\\.]+)");
+ private static final Pattern placeholderPattern = Pattern.compile("\\$\\{([\\w\\.]+)\\}");
private final Properties props;
private final Properties resolved;
private final List<String> queue;
diff --git a/src/test/java/org/sonarsource/scanner/cli/PropertyResolverTest.java b/src/test/java/org/sonarsource/scanner/cli/PropertyResolverTest.java
index 5391671..c0b3bd2 100644
--- a/src/test/java/org/sonarsource/scanner/cli/PropertyResolverTest.java
+++ b/src/test/java/org/sonarsource/scanner/cli/PropertyResolverTest.java
@@ -104,13 +104,13 @@ public class PropertyResolverTest {
assertThat(resolved.get("B")).isEqualTo("value b");
assertThat(resolved.get("C")).isEqualTo("${A value b}");
}
-
+
@Test
public void missing_var() {
Map<String, String> env = new HashMap<>();
Properties map = new Properties();
- map.put("A", "/path/$missing var/");
-
+ map.put("A", "/path/${missing} var/");
+
PropertyResolver resolver = new PropertyResolver(map, env);
Properties resolved = resolver.resolve();
assertThat(resolved.get("A")).isEqualTo("/path/ var/");