Author: rsearls
Date: 2013-12-16 11:07:06 -0500 (Mon, 16 Dec 2013)
New Revision: 18183
Modified:
common/branches/jbossws-common-1.1.0/src/main/java/org/jboss/ws/core/utils/ResourceURL.java
Log:
JBPAPP-10417: changed os.name check to set and maintain a boolean
Modified:
common/branches/jbossws-common-1.1.0/src/main/java/org/jboss/ws/core/utils/ResourceURL.java
===================================================================
---
common/branches/jbossws-common-1.1.0/src/main/java/org/jboss/ws/core/utils/ResourceURL.java 2013-12-16
15:23:57 UTC (rev 18182)
+++
common/branches/jbossws-common-1.1.0/src/main/java/org/jboss/ws/core/utils/ResourceURL.java 2013-12-16
16:07:06 UTC (rev 18183)
@@ -39,6 +39,8 @@
public class ResourceURL
{
private URL targetURL;
+ //- JBPAPP-10417 handling of spaces in path.
+ private boolean isMacOs =
System.getProperty("os.name").toLowerCase().startsWith("mac os x");
public ResourceURL(URL targetURL)
{
@@ -54,9 +56,8 @@
{
boolean isJarUrl = "jar".equals(targetURL.getProtocol());
- //- JBPAPP-10417 handling of spaces in path.
URL tmpTargetURL = this.targetURL;
- if (System.getProperty("os.name").toLowerCase().startsWith("mac os
x")){
+ if (isMacOs){
tmpTargetURL = new URL(targetURL.getProtocol(), targetURL.getHost(),
targetURL.getPort(), URLEncoder.encode(targetURL.getFile(),
"UTF-8"));
}
Show replies by date