[jboss-cvs] JBossAS SVN: r90050 - branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jun 10 09:16:34 EDT 2009


Author: emuckenhuber
Date: 2009-06-10 09:16:34 -0400 (Wed, 10 Jun 2009)
New Revision: 90050

Modified:
   branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
Log:
fix ViewUse usage

Modified: branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java	2009-06-10 10:06:44 UTC (rev 90049)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java	2009-06-10 13:16:34 UTC (rev 90050)
@@ -21,14 +21,10 @@
  */
 package org.jboss.test.profileservice.test;
 
-import java.lang.annotation.Annotation;
-import java.net.URI;
-import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.TreeSet;
@@ -49,7 +45,6 @@
 import org.jboss.managed.api.ManagedOperation;
 import org.jboss.managed.api.ManagedProperty;
 import org.jboss.managed.api.RunState;
-import org.jboss.managed.api.annotation.ManagementProperty;
 import org.jboss.managed.api.annotation.ViewUse;
 import org.jboss.metatype.api.types.CompositeMetaType;
 import org.jboss.metatype.api.types.MapCompositeMetaType;
@@ -64,7 +59,6 @@
 import org.jboss.profileservice.spi.NoSuchProfileException;
 import org.jboss.profileservice.spi.ProfileKey;
 import org.jboss.profileservice.spi.ProfileService;
-import org.jboss.virtual.VFS;
 
 /** Test of using ProfileService
 
@@ -578,18 +572,10 @@
       ArrayList<ManagedProperty> stats = new ArrayList<ManagedProperty>();
       for(ManagedProperty prop : props.values())
       {
-         Map<String, Annotation> annotations = prop.getAnnotations();
-         if(annotations == null)
-            continue;
-         ManagementProperty mpa = (ManagementProperty) annotations.get(ManagementProperty.class.getName());
-         ViewUse[] uses = mpa.use();
-         for(ViewUse use : uses)
+         if(prop.hasViewUse(ViewUse.STATISTIC))
          {
-            if(use == ViewUse.STATISTIC)
-            {
-               log.info("STATISTIC: "+prop+", value: "+prop.getValue());
-               stats.add(prop);
-            }
+            log.info("STATISTIC: "+prop+", value: "+prop.getValue());
+            stats.add(prop);
          }
       }
       assertTrue("Saw ManagedProperty(ViewUse.STATISTIC)", stats.size() > 0);




More information about the jboss-cvs-commits mailing list