diff --git a/dubbo-test/dubbo-test-modules/src/test/java/org/apache/dubbo/dependency/FileTest.java b/dubbo-test/dubbo-test-modules/src/test/java/org/apache/dubbo/dependency/FileTest.java index 85775ae2c51..4a69205f853 100644 --- a/dubbo-test/dubbo-test-modules/src/test/java/org/apache/dubbo/dependency/FileTest.java +++ b/dubbo-test/dubbo-test-modules/src/test/java/org/apache/dubbo/dependency/FileTest.java @@ -33,6 +33,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; @@ -416,7 +417,7 @@ public void readSPI(File path, List spis) { absolutePath = absolutePath.substring(absolutePath.lastIndexOf("src" + File.separator + "main" + File.separator + "java" + File.separator) + ("src" + File.separator + "main" + File.separator + "java" + File.separator).length()); absolutePath = absolutePath.substring(0, absolutePath.lastIndexOf(".java")); - absolutePath = absolutePath.replaceAll(File.separator, "."); + absolutePath = absolutePath.replaceAll(Matcher.quoteReplacement(File.separator), "."); spis.add(absolutePath); } } @@ -439,7 +440,7 @@ public void readSPIResource(File path, Map spis) { String absolutePath = path.getAbsolutePath(); absolutePath = absolutePath.substring(absolutePath.lastIndexOf("src" + File.separator + "main" + File.separator + "resources" + File.separator + "META-INF" + File.separator + "dubbo" + File.separator + "internal" + File.separator) + ("src" + File.separator + "main" + File.separator + "resources" + File.separator + "META-INF" + File.separator + "dubbo" + File.separator + "internal" + File.separator).length()); - absolutePath = absolutePath.replaceAll( File.separator, "."); + absolutePath = absolutePath.replaceAll(Matcher.quoteReplacement(File.separator), "."); spis.put(path, absolutePath); } } diff --git a/pom.xml b/pom.xml index d6985bde292..439d5f1de22 100644 --- a/pom.xml +++ b/pom.xml @@ -120,7 +120,7 @@ 3.2.0 9.4.38.v20210224 3.1.2 - 0.8.7 + 0.8.8 1.3.0 3.0.0-M3 0.13