diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-02-14 13:56:49 +0300 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-02-19 02:16:01 +0300 |
commit | ede312df67174193caae2ec087a5319a36e0d647 (patch) | |
tree | 4ad44926fd2ed0d8421ce03ddd4fb06493b245c6 /sonar-plugin-api | |
parent | 09349ffce7b246dffb6dfc97fefb81db8fb1ba2a (diff) | |
download | sonarqube-ede312df67174193caae2ec087a5319a36e0d647.tar.gz sonarqube-ede312df67174193caae2ec087a5319a36e0d647.zip |
SONAR-2193 Pattern matching should work in case if pattern ends on "/**"
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/utils/WildcardPattern.java | 2 | ||||
-rw-r--r-- | sonar-plugin-api/src/test/java/org/sonar/api/utils/WildcardPatternTest.java | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/WildcardPattern.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/WildcardPattern.java index 2f1a46a9a1d..0403d82aa3b 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/WildcardPattern.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/WildcardPattern.java @@ -48,7 +48,7 @@ public class WildcardPattern { String patternStr = removeSlahesToIgnore(wildcardPattern); patternStr = StringUtils.replace(patternStr, "**/**", "**"); patternStr = StringUtils.replace(patternStr, "**/", "(&/|)"); - patternStr = StringUtils.replace(patternStr, "/**", "&"); + patternStr = StringUtils.replace(patternStr, "/**", "/&"); patternStr = StringUtils.replace(patternStr, "**", "&"); StringBuilder sb = new StringBuilder(); diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/WildcardPatternTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/WildcardPatternTest.java index 16ece8c3704..0a5a7aeaff7 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/WildcardPatternTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/WildcardPatternTest.java @@ -24,7 +24,6 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; -import org.junit.Ignore; import org.junit.Test; public class WildcardPatternTest { @@ -106,7 +105,6 @@ public class WildcardPatternTest { /** * See http://jira.codehaus.org/browse/SONAR-2193 */ - @Ignore @Test public void issue2193() { assertTrue(match("**/app/**", "com.app.Utils", ".")); |