camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/2] camel git commit: Fix CAMEL-8065
Date Thu, 20 Nov 2014 14:10:33 GMT
Fix CAMEL-8065


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ffb4fb80
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ffb4fb80
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ffb4fb80

Branch: refs/heads/camel-2.14.x
Commit: ffb4fb800bc471a13b9498a22663931ae725e3be
Parents: 622649d
Author: Paul McCulloch <paul.mcculloch@axiossystems.com>
Authored: Thu Nov 20 13:43:52 2014 +0000
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Nov 20 15:10:20 2014 +0100

----------------------------------------------------------------------
 .../apache/camel/maven/AbstractApiMethodGeneratorMojo.java    | 7 ++++---
 .../org/apache/camel/maven/ApiComponentGeneratorMojo.java     | 3 ++-
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/ffb4fb80/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/AbstractApiMethodGeneratorMojo.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/AbstractApiMethodGeneratorMojo.java
b/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/AbstractApiMethodGeneratorMojo.java
index d11d894..cdbbc38 100644
--- a/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/AbstractApiMethodGeneratorMojo.java
+++ b/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/AbstractApiMethodGeneratorMojo.java
@@ -22,6 +22,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
 import java.util.regex.Pattern;
+import java.util.regex.Matcher;
 
 import org.apache.camel.util.component.ApiMethodParser;
 import org.apache.camel.util.component.ArgumentSubstitutionParser;
@@ -111,7 +112,7 @@ public abstract class AbstractApiMethodGeneratorMojo extends AbstractApiMethodBa
 
     public File getApiMethodFile() throws MojoExecutionException {
         final StringBuilder fileName = new StringBuilder();
-        fileName.append(outPackage.replaceAll("\\.", File.separator)).append(File.separator);
+        fileName.append(outPackage.replaceAll("\\.", Matcher.quoteReplacement(File.separator))).append(File.separator);
         fileName.append(getEnumName()).append(".java");
         return new File(generatedSrcDir, fileName.toString());
     }
@@ -133,7 +134,7 @@ public abstract class AbstractApiMethodGeneratorMojo extends AbstractApiMethodBa
 
     private String getTestFilePath() throws MojoExecutionException {
         final StringBuilder fileName = new StringBuilder();
-        fileName.append(componentPackage.replaceAll("\\.", File.separator)).append(File.separator);
+        fileName.append(componentPackage.replaceAll("\\.", Matcher.quoteReplacement(File.separator))).append(File.separator);
         fileName.append(getUnitTestName()).append(".java");
         return fileName.toString();
     }
@@ -195,7 +196,7 @@ public abstract class AbstractApiMethodGeneratorMojo extends AbstractApiMethodBa
     private File getConfigurationFile() throws MojoExecutionException {
         final StringBuilder fileName = new StringBuilder();
         // endpoint configuration goes in component package
-        fileName.append(componentPackage.replaceAll("\\.", File.separator)).append(File.separator);
+        fileName.append(componentPackage.replaceAll("\\.", Matcher.quoteReplacement(File.separator))).append(File.separator);
         fileName.append(getConfigName()).append(".java");
         return new File(generatedSrcDir, fileName.toString());
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/ffb4fb80/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/ApiComponentGeneratorMojo.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/ApiComponentGeneratorMojo.java
b/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/ApiComponentGeneratorMojo.java
index 3008be8..960dc59 100644
--- a/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/ApiComponentGeneratorMojo.java
+++ b/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/ApiComponentGeneratorMojo.java
@@ -19,6 +19,7 @@ package org.apache.camel.maven;
 import java.io.File;
 import java.util.Collections;
 import java.util.List;
+import java.util.regex.Matcher;
 
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
@@ -225,7 +226,7 @@ public class ApiComponentGeneratorMojo extends AbstractApiMethodBaseMojo
{
 
     private StringBuilder getFileBuilder() {
         final StringBuilder fileName = new StringBuilder();
-        fileName.append(outPackage.replaceAll("\\.", File.separator)).append(File.separator);
+        fileName.append(outPackage.replaceAll("\\.", Matcher.quoteReplacement(File.separator))).append(File.separator);
         return fileName;
     }
 


Mime
View raw message