[jboss-cvs] JBossAS SVN: r77345 - trunk/testsuite/src/main/org/jboss/test/profileservice/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Aug 22 05:16:51 EDT 2008
Author: alesj
Date: 2008-08-22 05:16:50 -0400 (Fri, 22 Aug 2008)
New Revision: 77345
Modified:
trunk/testsuite/src/main/org/jboss/test/profileservice/test/DeployUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
Log:
Seeing some AOOBE on Hudson but not locally, gathering more info.
Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/DeployUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/DeployUnitTestCase.java 2008-08-22 08:03:23 UTC (rev 77344)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/DeployUnitTestCase.java 2008-08-22 09:16:50 UTC (rev 77345)
@@ -66,6 +66,7 @@
return "profileservice";
}
+ @SuppressWarnings("deprecation")
protected void testDeployment(String name, String type, ManagedDeploymentTester tester) throws Exception
{
DeploymentManager deployMgr = getDeploymentManager();
Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java 2008-08-22 08:03:23 UTC (rev 77344)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java 2008-08-22 09:16:50 UTC (rev 77345)
@@ -21,40 +21,38 @@
*/
package org.jboss.test.profileservice.test;
+import java.io.Serializable;
+import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
-import java.util.HashMap;
import java.util.TreeSet;
-import java.io.Serializable;
-import java.lang.annotation.Annotation;
-
import javax.naming.InitialContext;
import junit.framework.Test;
import junit.framework.TestSuite;
-
+import org.jboss.deployers.spi.management.KnownComponentTypes;
import org.jboss.deployers.spi.management.KnownDeploymentTypes;
import org.jboss.deployers.spi.management.ManagementView;
-import org.jboss.deployers.spi.management.KnownComponentTypes;
import org.jboss.managed.api.ComponentType;
import org.jboss.managed.api.DeploymentTemplateInfo;
import org.jboss.managed.api.ManagedComponent;
import org.jboss.managed.api.ManagedDeployment;
import org.jboss.managed.api.ManagedDeployment.DeploymentPhase;
-import org.jboss.managed.api.annotation.ViewUse;
-import org.jboss.managed.api.annotation.ManagementProperty;
import org.jboss.managed.api.ManagedObject;
import org.jboss.managed.api.ManagedOperation;
import org.jboss.managed.api.ManagedProperty;
+import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.managed.api.annotation.ViewUse;
import org.jboss.metatype.api.types.SimpleMetaType;
import org.jboss.metatype.api.values.GenericValue;
import org.jboss.metatype.api.values.MapCompositeValueSupport;
import org.jboss.metatype.api.values.MetaValue;
+import org.jboss.metatype.api.values.SimpleValue;
import org.jboss.metatype.api.values.SimpleValueSupport;
-import org.jboss.metatype.api.values.SimpleValue;
import org.jboss.profileservice.spi.NoSuchProfileException;
import org.jboss.profileservice.spi.ProfileKey;
import org.jboss.profileservice.spi.ProfileService;
@@ -142,6 +140,9 @@
for (String name : names)
{
String[] paths = name.split("/");
+ if (paths.length < 2)
+ throw new IllegalArgumentException("Expecting at least 2 tokens: " + name);
+
// Add back in any trailing '/'
if(name.endsWith("/"))
paths[paths.length - 1] += "/";
More information about the jboss-cvs-commits
mailing list