[java-idp-testbed COMMIT] /trunk/src/main/java/common/PathPropertySupport.java
noreply at shibboleth.net
noreply at shibboleth.net
Mon Feb 10 09:16:51 EST 2014
Author: rdw
Date: Mon Feb 10 09:16:51 2014
New Revision: 144
URL: http://svn.shibboleth.net/view/java-idp-testbed?rev=144&view=rev
Log:
Windows: More name normalization shenanigans
This is quite, quite, hideous. Under Windows we have to prefix "DOS device" type paths with "/" so that the 'prefix with "file://"' paradigm works. So IDP_HOME and its friends have to be 'normalized'. However java.nio.Paths doesn't understand "\c:", as a path, it only understands "c:" (don't even ask). So for Strings that get passed into java.nio.Paths we need the non-normalized name. We achieve this by setting the property as normalized, but returning the non normalized string.
Modified:
trunk/src/main/java/common/PathPropertySupport.java
Modified: trunk/src/main/java/common/PathPropertySupport.java
URL: http://svn.shibboleth.net/view/java-idp-testbed/trunk/src/main/java/common/PathPropertySupport.java?rev=144&r1=143&r2=144&view=diff
==============================================================================
--- trunk/src/main/java/common/PathPropertySupport.java (original)
+++ trunk/src/main/java/common/PathPropertySupport.java Mon Feb 10 09:16:51 2014
@@ -113,11 +113,14 @@
value = Paths.get("").toAbsolutePath().toString();
}
+ final String normalizedValue;
if (needsNormalized(value)) {
- value = normalizePath(value);
+ normalizedValue = normalizePath(value);
+ } else {
+ normalizedValue = value;
}
- System.setProperty(name, value);
+ System.setProperty(name, normalizedValue);
return value;
}
More information about the commits
mailing list