Author: chris.laprun(a)jboss.com
Date: 2012-03-23 10:52:52 -0400 (Fri, 23 Mar 2012)
New Revision: 8638
Modified:
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/WSRPServiceIntegration.java
Log:
Bug 805875 - WSRP configuration files to be picked up from gatein.conf.dir on Windows
machine: fixed path wrangling so that it also works on Windows systems
Modified:
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/WSRPServiceIntegration.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/WSRPServiceIntegration.java 2012-03-23
11:10:30 UTC (rev 8637)
+++
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/WSRPServiceIntegration.java 2012-03-23
14:52:52 UTC (rev 8638)
@@ -179,8 +179,15 @@
private String computePath(String pathFromConfig)
{
- // if specified path starts with / then it's a file and we need to add file://
to it so that ConfigurationManager can properly resolve it
- return pathFromConfig.startsWith("/") ? FILE + pathFromConfig :
pathFromConfig;
+ // if the specified path doesn't start with one of the recognized protocol,
then it should be a file URL
+ if (!pathFromConfig.startsWith("jar:") &&
!pathFromConfig.startsWith("classpath:") &&
!pathFromConfig.startsWith("war:") &&
!pathFromConfig.startsWith("file:"))
+ {
+ return FILE + pathFromConfig;
+ }
+ else
+ {
+ return pathFromConfig;
+ }
}
public void start()