You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2008/07/30 20:15:07 UTC

svn commit: r681160 - in /tomcat: container/tc5.5.x/webapps/docs/changelog.xml current/tc5.5.x/STATUS.txt jasper/tc5.5.x/src/share/org/apache/jasper/compiler/AntCompiler.java

Author: markt
Date: Wed Jul 30 11:15:07 2008
New Revision: 681160

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

Modified:
    tomcat/container/tc5.5.x/webapps/docs/changelog.xml
    tomcat/current/tc5.5.x/STATUS.txt
    tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/AntCompiler.java

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=681160&r1=681159&r2=681160&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Wed Jul 30 11:15:07 2008
@@ -75,6 +75,13 @@
       </fix>
     </changelog>
   </subsection>
+  <subsection name="Jasper">
+    <changelog>
+      <fix>
+        <bug>31257</bug>: Quote endorsed dirs if they contain a space. (markt)
+      </fix>
+    </changelog>
+  </subsection>
   <subsection name="Webapps">
     <changelog>
       <fix>

Modified: tomcat/current/tc5.5.x/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/current/tc5.5.x/STATUS.txt?rev=681160&r1=681159&r2=681160&view=diff
==============================================================================
--- tomcat/current/tc5.5.x/STATUS.txt (original)
+++ tomcat/current/tc5.5.x/STATUS.txt Wed Jul 30 11:15:07 2008
@@ -79,12 +79,6 @@
   +1: markt
   -1: fhanik - same as all the above 
 
-* 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, fhanik, yoavs
-  -1: 
-
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=43578
   http://svn.apache.org/viewvc?rev=651713&view=rev
   Tomcat doesn't start if installation path contains a space

Modified: tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/AntCompiler.java
URL: http://svn.apache.org/viewvc/tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/AntCompiler.java?rev=681160&r1=681159&r2=681160&view=diff
==============================================================================
--- tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/AntCompiler.java (original)
+++ tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/AntCompiler.java Wed Jul 30 11:15:07 2008
@@ -171,8 +171,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");
             }
@@ -272,5 +274,22 @@
         }
     }
 
-    
+    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();
+    }    
 }



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