You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2016/08/01 22:01:17 UTC
svn commit: r1754803 -
/uima/uimaj/branches/experiment-v3-jcas/uimaj-jet-expander/src/org/apache/uima/util/jet/JetExpander.java
Author: schor
Date: Mon Aug 1 22:01:17 2016
New Revision: 1754803
URL: http://svn.apache.org/viewvc?rev=1754803&view=rev
Log:
no Jira - fix the use of replaceAll when replacing "." with File separator string - this doesn't quite work on windows because the File.separator needs to be "doubled".
Modified:
uima/uimaj/branches/experiment-v3-jcas/uimaj-jet-expander/src/org/apache/uima/util/jet/JetExpander.java
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-jet-expander/src/org/apache/uima/util/jet/JetExpander.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-jet-expander/src/org/apache/uima/util/jet/JetExpander.java?rev=1754803&r1=1754802&r2=1754803&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-jet-expander/src/org/apache/uima/util/jet/JetExpander.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-jet-expander/src/org/apache/uima/util/jet/JetExpander.java Mon Aug 1 22:01:17 2016
@@ -165,7 +165,10 @@ public class JetExpander {
String outFileName = null;
try {
- outFileName = outDir + File.separator + pkg.replaceAll("\\.", File.separator) + File.separator + className + ".java";
+ // replaceAll with replacement of "File.separator" fails in Java 8 with
+ // illegal arg exception; needs to be doubled!
+ // avoid that by using forward slash which works with Java paths anyways.
+ outFileName = outDir + File.separator + pkg.replaceAll("\\.","/") + File.separator + className + ".java";
(new File(pathOnly(outFileName))).mkdirs();
fileWriter = new FileWriter(outFileName);
} catch (IOException e1) {