Summary: | Replace System.getProperty("file.separator") with File.separator throughout | ||
---|---|---|---|
Product: | Tomcat 7 | Reporter: | Sebb <sebb> |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | trivial | ||
Priority: | P2 | ||
Version: | trunk | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All |
Description
Sebb
2014-12-04 13:04:24 UTC
I have a patch for trunk [1] that I'll commit once svn writes are available again. Then I'll look at back-ports. [1] https://github.com/markt-asf/tomcat/commit/0744a45a939311cc0ac0981a6922e4afd1e2e7d4 (In reply to Mark Thomas from comment #1) > I have a patch for trunk [1] that I'll commit once svn writes are available > again. Then I'll look at back-ports. > > [1] > https://github.com/markt-asf/tomcat/commit/ > 0744a45a939311cc0ac0981a6922e4afd1e2e7d4 That would fix the instances I found. It looks like the same applies to "path.separator" and File.pathSeparator. i.e. changing the property causes issues for startup, and only the first char is used by Java. If so, here are the instances I found in trunk: java/org/apache/jasper/compiler/AntCompiler.java: String sep = System.getProperty("path.separator"); java/org/apache/jasper/compiler/JspRuntimeContext.java: String sep = System.getProperty("path.separator"); java/org/apache/tomcat/jni/Library.java: String sep = System.getProperty("path.separator"); test/org/apache/juli/TestClassLoaderLogManager.java: + System.getProperty("path.separator") test/org/apache/juli/TestClassLoaderLogManager.java: + System.getProperty("path.separator") + "baz", test/org/apache/juli/TestClassLoaderLogManager.java: Assert.assertEquals("${}" + System.getProperty("path.separator"), Fixed in trunk, 8.0.x (for 8.0.16 onwards) and 7.0.x (for 7.0.58 onwards). |