use replace instead of replaceAll

This commit is contained in:
wing328
2015-06-23 21:47:10 +08:00
parent 550493ba84
commit 2979d93829

View File

@@ -101,11 +101,12 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
return (getPackagePath() + File.separatorChar + basePath
// Replace period, backslash, forward slash with file separator in package name
+ packageName.replaceAll("[\\.\\\\/]", File.separator)
+ packageName.replace("\\", File.separator).
replace(".", File.separator).replace("/", File.separator)
// Trim prefix file separators from package path
.replaceAll("^" + File.separator, ""))
// Trim trailing file separators from the overall path
.replaceAll(File.separator + "$", "");
// Trim trailing file separators from the overall path
.replaceAll(File.separator + "$", "");
}
public CodegenType getTag() {