Author: richard.opalka(a)jboss.com
Date: 2009-08-04 09:15:48 -0400 (Tue, 04 Aug 2009)
New Revision: 10479
Modified:
framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/DefaultService.java
framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/VirtualHostDeploymentAspect.java
Log:
[JBWS-2332] fix Service consistency
Modified:
framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/DefaultService.java
===================================================================
---
framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/DefaultService.java 2009-08-04
13:14:08 UTC (rev 10478)
+++
framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/DefaultService.java 2009-08-04
13:15:48 UTC (rev 10479)
@@ -26,6 +26,7 @@
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
+import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
@@ -43,7 +44,7 @@
private Deployment dep;
private List<Endpoint> endpoints = new LinkedList<Endpoint>();
private String contextRoot;
- private String[] virtualHosts;
+ private List<String> virtualHosts;
DefaultService()
{
@@ -94,12 +95,19 @@
this.contextRoot = contextRoot;
}
- public String[] getVirtualHosts()
+ public List<String> getVirtualHosts()
{
- return virtualHosts;
+ if ( virtualHosts != null )
+ {
+ final List<String> retVal = new LinkedList<String>();
+ Collections.copy(retVal, virtualHosts);
+ return retVal;
+ }
+
+ return null;
}
- public void setVirtualHosts(String[] virtualHosts)
+ public void setVirtualHosts(List<String> virtualHosts)
{
this.virtualHosts = virtualHosts;
}
Modified:
framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/VirtualHostDeploymentAspect.java
===================================================================
---
framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/VirtualHostDeploymentAspect.java 2009-08-04
13:14:08 UTC (rev 10478)
+++
framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/VirtualHostDeploymentAspect.java 2009-08-04
13:15:48 UTC (rev 10479)
@@ -23,6 +23,7 @@
package org.jboss.wsf.framework.deployment;
import java.util.Arrays;
+import java.util.List;
import org.jboss.wsf.spi.annotation.WebContext;
import org.jboss.wsf.spi.deployment.Deployment;
@@ -44,15 +45,11 @@
{
if ( DeploymentType.JAXWS_EJB3.equals(dep.getType()))
{
- String[] virtualHosts = dep.getService().getVirtualHosts();
- if (virtualHosts == null)
- {
- dep.getService().setVirtualHosts(getExplicitVirtualHosts(dep));
- }
+ dep.getService().setVirtualHosts(getExplicitVirtualHosts(dep));
}
}
- protected String[] getExplicitVirtualHosts(Deployment dep)
+ protected List<String> getExplicitVirtualHosts(Deployment dep)
{
String[] virtualHosts = null;
@@ -82,6 +79,14 @@
}
}
}
- return virtualHosts;
+
+ if ( virtualHosts != null )
+ {
+ return Arrays.asList(virtualHosts);
+ }
+ else
+ {
+ return null;
+ }
}
}
Show replies by thread