Author: markt
Date: Fri Dec 5 15:26:47 2014
New Revision: 1643330
URL: http://svn.apache.org/r1643330
Log:
Foolow up to r1643329
Replace calls to System.getProperty("path.separator" with File.pathSeperator
Modified:
tomcat/tc8.0.x/trunk/ (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/jasper/compiler/AntCompiler.java
tomcat/tc8.0.x/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java
tomcat/tc8.0.x/trunk/java/org/apache/tomcat/jni/Library.java
tomcat/tc8.0.x/trunk/test/org/apache/juli/TestClassLoaderLogManager.java
Propchange: tomcat/tc8.0.x/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec 5 15:26:47 2014
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642668,1642679,1642697,1642699,1643002,1643066,1643121,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309
+/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642668,1642679,1642697,1642699,1643002,1643066,1643121,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310
Modified: tomcat/tc8.0.x/trunk/java/org/apache/jasper/compiler/AntCompiler.java
URL:
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/jasper/compiler/AntCompiler.java?rev=1643330&r1=1643329&r2=1643330&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/jasper/compiler/AntCompiler.java
(original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/jasper/compiler/AntCompiler.java Fri
Dec 5 15:26:47 2014
@@ -130,8 +130,6 @@ public class AntCompiler extends Compile
String javaFileName = ctxt.getServletJavaFileName();
String classpath = ctxt.getClassPath();
- String sep = System.getProperty("path.separator");
-
StringBuilder errorReport = new StringBuilder();
StringBuilder info=new StringBuilder();
@@ -149,7 +147,7 @@ public class AntCompiler extends Compile
Path path = new Path(project);
path.setPath(System.getProperty("java.class.path"));
info.append(" cp=" + System.getProperty("java.class.path") + "\n");
- StringTokenizer tokenizer = new StringTokenizer(classpath, sep);
+ StringTokenizer tokenizer = new StringTokenizer(classpath,
File.pathSeparator);
while (tokenizer.hasMoreElements()) {
String pathElement = tokenizer.nextToken();
File repository = new File(pathElement);
@@ -157,9 +155,10 @@ public class AntCompiler extends Compile
info.append(" cp=" + repository + "\n");
}
- if( log.isDebugEnabled() )
- log.debug( "Using classpath: " +
System.getProperty("java.class.path") + sep
- + classpath);
+ if (log.isDebugEnabled()) {
+ log.debug( "Using classpath: " +
System.getProperty("java.class.path") +
+ File.pathSeparator + classpath);
+ }
// Initializing sourcepath
Path srcPath = new Path(project);
Modified:
tomcat/tc8.0.x/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java
URL:
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java?rev=1643330&r1=1643329&r2=1643330&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java
(original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java
Fri Dec 5 15:26:47 2014
@@ -398,7 +398,6 @@ public final class JspRuntimeContext {
private String initClassPath() {
StringBuilder cpath = new StringBuilder();
- String sep = System.getProperty("path.separator");
if (parentClassLoader instanceof URLClassLoader) {
URL [] urls = ((URLClassLoader)parentClassLoader).getURLs();
@@ -413,7 +412,7 @@ public final class JspRuntimeContext {
// Need to decode the URL, primarily to convert %20
// sequences back to spaces
String decoded = URLDecoder.decode(urls[i].getPath(),
"UTF-8");
- cpath.append(decoded + sep);
+ cpath.append(decoded + File.pathSeparator);
} catch (UnsupportedEncodingException e) {
// All JREs are required to support UTF-8
}
@@ -421,7 +420,7 @@ public final class JspRuntimeContext {
}
}
- cpath.append(options.getScratchDir() + sep);
+ cpath.append(options.getScratchDir() + File.pathSeparator);
String cp = (String) context.getAttribute(Constants.SERVLET_CLASSPATH);
if (cp == null || cp.equals("")) {
Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/jni/Library.java
URL:
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/jni/Library.java?rev=1643330&r1=1643329&r2=1643330&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/jni/Library.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/jni/Library.java Fri Dec 5
15:26:47 2014
@@ -17,6 +17,8 @@
package org.apache.tomcat.jni;
+import java.io.File;
+
/** Library
*
* @author Mladen Turk
@@ -49,8 +51,7 @@ public final class Library {
}
String name = System.mapLibraryName(NAMES[i]);
String path = System.getProperty("java.library.path");
- String sep = System.getProperty("path.separator");
- String [] paths = path.split(sep);
+ String [] paths = path.split(File.pathSeparator);
for (int j=0; j<paths.length; j++) {
java.io.File fd = new java.io.File(paths[j] , name);
if (fd.exists()) {
Modified:
tomcat/tc8.0.x/trunk/test/org/apache/juli/TestClassLoaderLogManager.java
URL:
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/test/org/apache/juli/TestClassLoaderLogManager.java?rev=1643330&r1=1643329&r2=1643330&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/test/org/apache/juli/TestClassLoaderLogManager.java
(original)
+++ tomcat/tc8.0.x/trunk/test/org/apache/juli/TestClassLoaderLogManager.java
Fri Dec 5 15:26:47 2014
@@ -35,31 +35,22 @@ public class TestClassLoaderLogManager {
ClassLoaderLogManager logManager = new ClassLoaderLogManager();
Assert.assertEquals("", logManager.replace(""));
Assert.assertEquals("${", logManager.replace("${"));
- Assert.assertEquals("${undefinedproperty}",
- logManager.replace("${undefinedproperty}"));
+ Assert.assertEquals("${undefinedproperty}",
logManager.replace("${undefinedproperty}"));
Assert.assertEquals(
- System.getProperty("line.separator")
- + System.getProperty("path.separator")
- + File.separator,
- logManager
-
.replace("${line.separator}${path.separator}${file.separator}"));
+ System.getProperty("line.separator") + File.pathSeparator +
File.separator,
+
logManager.replace("${line.separator}${path.separator}${file.separator}"));
Assert.assertEquals(
- "foo" + File.separator + "bar"
- + System.getProperty("line.separator")
- + System.getProperty("path.separator") + "baz",
- logManager
-
.replace("foo${file.separator}bar${line.separator}${path.separator}baz"));
+ "foo" + File.separator + "bar" +
System.getProperty("line.separator")
+ + File.pathSeparator + "baz",
+
logManager.replace("foo${file.separator}bar${line.separator}${path.separator}baz"));
// BZ 51249
Assert.assertEquals(
"%{file.separator}" + File.separator,
logManager.replace("%{file.separator}${file.separator}"));
Assert.assertEquals(
- File.separator + "${undefinedproperty}"
- + File.separator,
- logManager
-
.replace("${file.separator}${undefinedproperty}${file.separator}"));
- Assert.assertEquals("${}" + System.getProperty("path.separator"),
- logManager.replace("${}${path.separator}"));
+ File.separator + "${undefinedproperty}" + File.separator,
+
logManager.replace("${file.separator}${undefinedproperty}${file.separator}"));
+ Assert.assertEquals("${}" + File.pathSeparator,
logManager.replace("${}${path.separator}"));
}
@Test
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]