[jboss-cvs] JBossAS SVN: r79215 - projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Oct 7 07:19:41 EDT 2008
Author: alesj
Date: 2008-10-07 07:19:41 -0400 (Tue, 07 Oct 2008)
New Revision: 79215
Modified:
projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/RequirementIntegrationDeployer.java
projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/UrlIntegrationDeployer.java
Log:
[JBDEPLOY-108]; fix non-collection setters.
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/RequirementIntegrationDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/RequirementIntegrationDeployer.java 2008-10-07 11:09:35 UTC (rev 79214)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/RequirementIntegrationDeployer.java 2008-10-07 11:19:41 UTC (rev 79215)
@@ -68,8 +68,10 @@
{
if (integrationModuleNames == null || integrationModuleNames.isEmpty())
return null;
- else
+ else if (integrationModuleNames.size() == 1)
return integrationModuleNames.iterator().next();
+ else
+ throw new IllegalArgumentException("Multiple integration module names: " + integrationModuleNames);
}
/**
@@ -79,10 +81,7 @@
*/
public void setIntegrationModuleName(String integrationModuleName)
{
- if (integrationModuleNames == null)
- this.integrationModuleNames = Collections.singleton(integrationModuleName);
- else
- this.integrationModuleNames.add(integrationModuleName);
+ this.integrationModuleNames = Collections.singleton(integrationModuleName);
}
/**
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/UrlIntegrationDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/UrlIntegrationDeployer.java 2008-10-07 11:09:35 UTC (rev 79214)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/UrlIntegrationDeployer.java 2008-10-07 11:19:41 UTC (rev 79215)
@@ -66,8 +66,10 @@
{
if (integrationURLs == null || integrationURLs.isEmpty())
return null;
- else
+ else if (integrationURLs.size() == 1)
return integrationURLs.iterator().next();
+ else
+ throw new IllegalArgumentException("Multiple integration urls: " + integrationURLs);
}
/**
@@ -77,10 +79,7 @@
*/
public void setIntegrationURL(URL url)
{
- if (integrationURLs == null)
- integrationURLs = Collections.singleton(url);
- else
- integrationURLs.add(url);
+ integrationURLs = Collections.singleton(url);
}
/**
More information about the jboss-cvs-commits
mailing list