[jboss-cvs] JBossAS SVN: r73717 - projects/aop/trunk/aspects/src/main/org/jboss/aspects/jmx.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue May 27 13:54:15 EDT 2008


Author: kabir.khan at jboss.com
Date: 2008-05-27 13:54:15 -0400 (Tue, 27 May 2008)
New Revision: 73717

Modified:
   projects/aop/trunk/aspects/src/main/org/jboss/aspects/jmx/JmxIntrospectingMixin.java
Log:
[JBAOP-581] Fix JmxIntrospectingMixin

Modified: projects/aop/trunk/aspects/src/main/org/jboss/aspects/jmx/JmxIntrospectingMixin.java
===================================================================
--- projects/aop/trunk/aspects/src/main/org/jboss/aspects/jmx/JmxIntrospectingMixin.java	2008-05-27 14:42:47 UTC (rev 73716)
+++ projects/aop/trunk/aspects/src/main/org/jboss/aspects/jmx/JmxIntrospectingMixin.java	2008-05-27 17:54:15 UTC (rev 73717)
@@ -279,10 +279,8 @@
          }
 
          HashMap<String, MBeanAttributeInfo> attributes = new HashMap<String, MBeanAttributeInfo>();
-         Iterator<String> it = gets.keySet().iterator();
-         while (it.hasNext())
+         for (String attribute : gets.keySet())
          {
-            String attribute = it.next();
             Method m = gets.get(attribute);
             //System.out.println("*** creating get: " + attribute);
             boolean isWritable = sets.containsKey(attribute);
@@ -290,10 +288,8 @@
             MBeanAttributeInfo info = new MBeanAttributeInfo(attribute, m.getReturnType().getName(), target.getClass().getName() + "." + attribute, true, isWritable, isIs);
             attributes.put(attribute, info);
          }
-         it = sets.keySet().iterator();
-         while (it.hasNext())
+         for (String attribute : sets.keySet())
          {
-            String attribute = it.next();
             if (gets.containsKey(attribute)) continue;
             //System.out.println("*** creating set: " + attribute);
             Method m = sets.get(attribute);
@@ -302,11 +298,9 @@
          }
 
          MBeanOperationInfo[] operations = new MBeanOperationInfo[ops.size()];
-         Iterator<Method> itops = ops.values().iterator();
          int i = 0;
-         while (it.hasNext())
+         for (Method m : ops.values())
          {
-            Method m = itops.next();
             operations[i++] = new MBeanOperationInfo(m.toString(), m);
          }
          MBeanAttributeInfo[] attrs = attributes.values().toArray(new MBeanAttributeInfo[attributes.size()]);




More information about the jboss-cvs-commits mailing list