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 7c3fb67 is described below commit 7c3fb673f4f17a9c31ebb5be54d3017d50aa41e7 Author: Mark Thomas <[hidden email]> 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: [hidden email] For additional commands, e-mail: [hidden email] |
Mark,
On 1/20/21 11:58, [hidden email] 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? -chris > 7c3fb67 is described below > > commit 7c3fb673f4f17a9c31ebb5be54d3017d50aa41e7 > Author: Mark Thomas <[hidden email]> > 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: [hidden email] > For additional commands, e-mail: [hidden email] > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
On 21/01/2021 13:51, Christopher Schultz wrote:
> Mark, > > On 1/20/21 11:58, [hidden email] 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 Tomcat 7 has a minimum requirement of Java 6 and Path is only available from Java 7 onwards. Mark > > -chris > >> 7c3fb67 is described below >> >> commit 7c3fb673f4f17a9c31ebb5be54d3017d50aa41e7 >> Author: Mark Thomas <[hidden email]> >> 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: [hidden email] >> For additional commands, e-mail: [hidden email] >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
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, [hidden email] 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 <[hidden email]> >>> 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: [hidden email] >>> For additional commands, e-mail: [hidden email] >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden email] >> For additional commands, e-mail: [hidden email] >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
On 21/01/2021 14:17, Christopher Schultz wrote:
> 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, [hidden email] 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. A little over 2 months and we can say goodbye to Java 6 support... .. and we'll be able to advance to the dizzy heights of Java 7 as a minimum :) Mark --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
Free forum by Nabble | Edit this page |