Mark,
On 1/21/21 09:15, Mark Thomas wrote:
On 21/01/2021 13:51, Christopher Schultz wrote:
Mark,
On 1/20/21 11:58, ma...@apache.org wrote:
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/7.0.x by this push:
new 7c3fb67 File separator, not path separator
Any reason not to use java.nio.Path here instead of a String?
I assume you mean java.nio.file.Path
Yep.
Tomcat 7 has a minimum requirement of Java 6 and Path is only available
from Java 7 onwards.
Oh, right. :(
I'd complain about "legacy Java versions" except that I'm still deployed
on Java 8 wah wahhh.
-chris
Mark
-chris
7c3fb67 is described below
commit 7c3fb673f4f17a9c31ebb5be54d3017d50aa41e7
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Jan 20 16:38:32 2021 +0000
File separator, not path separator
---
java/org/apache/catalina/util/FileUtil.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/catalina/util/FileUtil.java
b/java/org/apache/catalina/util/FileUtil.java
index d25bde7..c8a69cb 100644
--- a/java/org/apache/catalina/util/FileUtil.java
+++ b/java/org/apache/catalina/util/FileUtil.java
@@ -26,8 +26,8 @@ public class FileUtil {
public FileUtil(File f) throws IOException {
String path = f.getCanonicalPath();
- if (!path.endsWith(File.pathSeparator)) {
- path += File.pathSeparatorChar;
+ if (!path.endsWith(File.separator)) {
+ path += File.separatorChar;
}
canonicalPath = path;
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org