[
https://issues.jboss.org/browse/WFCORE-3867?page=com.atlassian.jira.plugi...
]
R Searls commented on WFCORE-3867:
----------------------------------
This is not the script providing a text string with a space char at the end. I have
confirmed that in the script in which I had this issue. I believe this is a
"doc2unix" end of line issue.
{code:java}
In DOS/Windows text files a line break, also known as newline, is a combination of two
characters: a
Carriage Return (CR) followed by a Line Feed (LF). In Unix text files a line break
is a single character:
the Line Feed (LF). In Mac text files, prior to Mac OS X, a line break was single
Carriage Return (CR)
character. Nowadays Mac OS uses Unix style (LF) line breaks.
{code}
I confirmed (when running on Windows) that every system var that was being read in had
this space char at the end. Windows just happens to allow paths with spaces in them. An
env var of JBOSS_HOME="C:\user\me\wfly-13" and server appending
"module" to it generated a path "C:\user\me\wfly-13 \module" which is
valid on windows. Only when the env path itself, "C:\user\me\wfly-13 ", was
being process does the call to Path.toPath().*toRealPath()* fail with an invalid path
exception.
Space char always last char of read system property on Windows
--------------------------------------------------------------
Key: WFCORE-3867
URL:
https://issues.jboss.org/browse/WFCORE-3867
Project: WildFly Core
Issue Type: Bug
Components: Server
Affects Versions: 5.0.0.Beta4
Reporter: R Searls
Assignee: R Searls
Priority: Minor
On Windows each system property read has a space char as the last char of string.
This causes failures when the property represents a directory name. Calling
tmp.toPath().toRealPath() in this situation.
ServerEnvironment line, 434 Path resolved = tmp.toPath().toRealPath();
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)