tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r652593 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/jasper/compiler/AntCompiler.java webapps/docs/changelog.xml
Date Thu, 01 May 2008 17:51:42 GMT
Author: markt
Date: Thu May  1 10:51:41 2008
New Revision: 652593

URL: http://svn.apache.org/viewvc?rev=652593&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=31257
Quote endorsed dirs if they contain a space

Modified:
    tomcat/tc6.0.x/trunk/STATUS.txt
    tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/AntCompiler.java
    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=652593&r1=652592&r2=652593&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Thu May  1 10:51:41 2008
@@ -76,12 +76,6 @@
   +1: fhanik, markt
   -1: 
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=31257
-  Quote endorsed dirs if they contain a space
-  http://svn.apache.org/viewvc?rev=649993&view=rev
-  +1: markt, remm, fhanik
-  -1: 
-
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=43617
   Correctly handle quotes in attribute values for tag(x) files
   http://svn.apache.org/viewvc?rev=651729&view=rev

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/AntCompiler.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/AntCompiler.java?rev=652593&r1=652592&r2=652593&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/AntCompiler.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/AntCompiler.java Thu May  1 10:51:41
2008
@@ -175,8 +175,10 @@
             if(endorsed != null) {
                 Javac.ImplementationSpecificArgument endorsedArg = 
                     javac.createCompilerArg();
-                endorsedArg.setLine("-J-Djava.endorsed.dirs="+endorsed);
-                info.append("    endorsed dir=" + endorsed + "\n");
+                endorsedArg.setLine("-J-Djava.endorsed.dirs=" +
+                        quotePathList(endorsed));
+                info.append("    endorsed dir=" + quotePathList(endorsed) +
+                        "\n");
             } else {
                 info.append("    no endorsed dirs specified\n");
             }
@@ -275,7 +277,26 @@
         }
     }
 
-    
+    private String quotePathList(String list) {
+        StringBuffer result = new StringBuffer(list.length() + 10);
+        StringTokenizer st = new StringTokenizer(list, File.pathSeparator);
+        while (st.hasMoreTokens()) {
+            String token = st.nextToken();
+            if (token.indexOf(' ') == -1) {
+                result.append(token);
+            } else {
+                result.append('\"');
+                result.append(token);
+                result.append('\"');
+            }
+            if (st.hasMoreTokens()) {
+                result.append(File.pathSeparatorChar);
+            }
+        }
+        return result.toString();
+    }
+
+
     protected static class SystemLogHandler extends PrintStream {
 
 

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=652593&r1=652592&r2=652593&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Thu May  1 10:51:41 2008
@@ -151,6 +151,9 @@
   <subsection name="Jasper">
     <changelog>
       <fix>
+        <bug>31257</bug>: Quote endorsed dirs if they contain a space. (markt)
+      </fix>
+      <fix>
         <bug>43656</bug>: Fix various numeric coercion bugs. Includes a patch
by
         Nils Eckert and fixes related issues identified in a test case provided
         by Konstantin Kolinko. (markt)



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message