Only in trunk: javax
Only in trunk/org/jboss: jmx
diff -EbwBru 6.0.0.M1/org/jboss/mx/capability/DispatchClassLoader.java trunk/org/jboss/mx/capability/DispatchClassLoader.java
--- 6.0.0.M1/org/jboss/mx/capability/DispatchClassLoader.java	2009-11-30 14:39:18.000000000 -0600
+++ trunk/org/jboss/mx/capability/DispatchClassLoader.java	2009-12-10 12:42:24.000000000 -0600
@@ -24,10 +24,8 @@
 /**
  * <description> 
  *
- * @see <related>
- *
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  *   
  */
 public class DispatchClassLoader extends ClassLoader
@@ -55,7 +53,7 @@
    }
    
    // Protected -----------------------------------------------------
-   protected Class findClass(String name) throws ClassNotFoundException
+   protected Class<?> findClass(String name) throws ClassNotFoundException
    {
       if (!name.equals(this.name))
          throw new ClassNotFoundException("Class not found: " + name + "(I'm a dispatch loader, I only know " + this.name + ")");
diff -EbwBru 6.0.0.M1/org/jboss/mx/capability/DispatcherFactory.java trunk/org/jboss/mx/capability/DispatcherFactory.java
--- 6.0.0.M1/org/jboss/mx/capability/DispatcherFactory.java	2009-11-30 14:39:18.000000000 -0600
+++ trunk/org/jboss/mx/capability/DispatcherFactory.java	2009-12-10 12:42:24.000000000 -0600
@@ -25,7 +25,6 @@
 import org.jboss.mx.metadata.MethodMapper;
 
 import org.jboss.mx.server.ServerConstants;
-import org.jboss.mx.util.PropertyAccess;
 
 import javax.management.DynamicMBean;
 import javax.management.IntrospectionException;
@@ -49,6 +48,11 @@
    /**
     * Creates a Dispatcher for an arbitrary resource.  Useful for when you don't care
     * about the AttributeOperationResolver.
+    * 
+    * @param info the mbean info
+    * @param resource the resource
+    * @return the dispatcher
+    * @throws IntrospectionException for any error
     */
    public static DynamicMBean create(MBeanInfo info, Object resource) throws IntrospectionException
    {
@@ -57,6 +61,12 @@
 
    /**
     * Creates a dispatcher for an arbitrary resource using the named AttributeOperationResolver.
+    * 
+    * @param info the mbean info
+    * @param resource the resource
+    * @param resolver the resolver
+    * @return the dispatcher
+    * @throws IntrospectionException for any error
     */
    public static DynamicMBean create(MBeanInfo info, Object resource, AttributeOperationResolver resolver) throws IntrospectionException
    {
diff -EbwBru 6.0.0.M1/org/jboss/mx/capability/OptimizedMBeanDispatcher.java trunk/org/jboss/mx/capability/OptimizedMBeanDispatcher.java
--- 6.0.0.M1/org/jboss/mx/capability/OptimizedMBeanDispatcher.java	2009-11-30 14:39:18.000000000 -0600
+++ trunk/org/jboss/mx/capability/OptimizedMBeanDispatcher.java	2009-12-10 12:42:24.000000000 -0600
@@ -53,13 +53,13 @@
  * @see org.jboss.mx.capability.DispatchClassLoader
  *
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  *
  */
 public class OptimizedMBeanDispatcher implements ServerConstants
 {
    // Constants -----------------------------------------------------
-   final static Class SUPER_CLASS = ReflectedMBeanDispatcher.class;
+   final static Class<?> SUPER_CLASS = ReflectedMBeanDispatcher.class;
 
 
    // Static --------------------------------------------------------
@@ -91,8 +91,8 @@
          // FIXME: also I dont know if the parent is right here, have to check later
          ClassLoader ocl = new DispatchClassLoader(resource.getClass().getClassLoader(), className, baos.toByteArray());
 
-         Class dispatcherClass = ocl.loadClass(className);
-         Constructor constr = dispatcherClass.getConstructor(
+         Class<?> dispatcherClass = ocl.loadClass(className);
+         Constructor<?> constr = dispatcherClass.getConstructor(
                new Class[] { MBeanInfo.class, AttributeOperationResolver.class, Object.class }
          );
 
@@ -143,6 +143,10 @@
     * <b><pre>  (IDLjava/lang/Thread;)Ljava/lang/Object;  </pre></b>
     *
     * Note that internal forms of the fully qualified names of Thread and Object are used in the method descriptor.
+    * 
+    * @param signature the signature
+    * @param returnType the return type
+    * @return the descriptor
     */
    public static String getMethodDescriptor(MBeanParameterInfo[] signature, String returnType)
    {
@@ -220,6 +224,7 @@
     *
     * @param   cp          constant pool
     * @param   className   name of the class being generated
+    * @return the method gen
     */
    protected static MethodGen createConstructor(ConstantPoolGen cp, String className)
    {
@@ -292,6 +297,7 @@
     * @param   info                 metadata of the MBean
     * @param   className            name of the class being generated
     * @param   resourceClassName    name of the resource class being invoked
+    * @return the method gen
     */
    protected static MethodGen createInvoke(ConstantPoolGen cp, MBeanInfo info, String className, String resourceClassName)
    {
@@ -729,7 +735,11 @@
     * performance if implemented directly with byte code. Overloaded operations with
     * equal arg list length may not show much difference compared to ternary search tree
     * based resolver.
+    * 
+    * @param info the mbean info
+    * @return the entries
     */
+   @SuppressWarnings("unchecked")
    protected static MethodEntry[] getOperations(MBeanInfo info)
    {
       HashMap operationMap            = new HashMap();
Only in trunk/org/jboss/mx/capability: PropertyAccess.java
diff -EbwBru 6.0.0.M1/org/jboss/mx/capability/ReflectedMBeanDispatcher.java trunk/org/jboss/mx/capability/ReflectedMBeanDispatcher.java
--- 6.0.0.M1/org/jboss/mx/capability/ReflectedMBeanDispatcher.java	2009-11-30 14:39:18.000000000 -0600
+++ trunk/org/jboss/mx/capability/ReflectedMBeanDispatcher.java	2009-12-10 12:42:24.000000000 -0600
@@ -262,6 +262,7 @@
       return list;
    }
 
+   @SuppressWarnings("unchecked")
    public AttributeList setAttributes(AttributeList attributes)
    {
       if (null == attributes)
diff -EbwBru 6.0.0.M1/org/jboss/mx/interceptor/AbstractInterceptor.java trunk/org/jboss/mx/interceptor/AbstractInterceptor.java
--- 6.0.0.M1/org/jboss/mx/interceptor/AbstractInterceptor.java	2009-11-30 14:39:21.000000000 -0600
+++ trunk/org/jboss/mx/interceptor/AbstractInterceptor.java	2009-12-10 12:42:27.000000000 -0600
@@ -35,7 +35,7 @@
  * @see org.jboss.mx.server.MBeanInvoker
  *
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
- * @version $Revision: 81026 $   
+ * @version $Revision: 85671 $   
  */
 public abstract class AbstractInterceptor 
    implements Interceptor
@@ -122,7 +122,7 @@
     *
     * @return  return value from the target resource
     *
-    * @throws InvocationException This exception wraps any exceptions thrown
+    * @throws Throwable This exception wraps any exceptions thrown
     *         by either the target method of the resource object, or invocation
     *         interceptors in this interceptor chain. The target exception is
     *         unwrapped at the {@link org.jboss.mx.server.MBeanInvoker} instance.
diff -EbwBru 6.0.0.M1/org/jboss/mx/interceptor/AbstractSharedInterceptor.java trunk/org/jboss/mx/interceptor/AbstractSharedInterceptor.java
--- 6.0.0.M1/org/jboss/mx/interceptor/AbstractSharedInterceptor.java	2009-11-30 14:39:21.000000000 -0600
+++ trunk/org/jboss/mx/interceptor/AbstractSharedInterceptor.java	2009-12-10 12:42:27.000000000 -0600
@@ -40,7 +40,7 @@
 import org.jboss.mx.modelmbean.RequiredModelMBeanInstantiator;
 import org.jboss.mx.server.Invocation;
 import org.jboss.mx.service.ServiceConstants;
-import org.jboss.mx.util.AgentID;
+import org.jboss.mx.util.MBeanServerLocator;
 
 
 /**
@@ -51,7 +51,7 @@
  * @see org.jboss.mx.server.MBeanInvoker
  *
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
- * @version $Revision: 81026 $   
+ * @version $Revision: 86129 $   
  */
 public abstract class AbstractSharedInterceptor 
    extends AbstractInterceptor
@@ -123,18 +123,9 @@
     *
     * </pre>
     *
-    * If the log reference has not been set for this interceptor when it is
-    * registered, this implementation will register a log MBean via the system
-    * log manager under {@link org.jboss.mx.service.ServiceConstants#JBOSSMX_DOMAIN JBOSSMX}
-    * domain (see {@link org.jboss.mx.logging.SystemLogManager SystemLogManager}
-    * for details). The log instance's name will match the pattern:   <br><pre>
-    *
-    *    "JBossMX.Interceptor.&lt;interceptor name&gt;"
-    *
-    * </pre>
-    *
     * @param   server   MBean server where this shared interceptor is registered
     */
+   @SuppressWarnings("unchecked")
    public synchronized ObjectName register(MBeanServer server) 
          throws InterceptorNameConflictException
    {
@@ -158,7 +149,7 @@
          if (names.size() > 0)
             throw new InterceptorNameConflictException(
                   "A shared interceptor named '" + name + "' already registered " +
-                  "to this MBean server (" + AgentID.get(server) + ")"
+                  "to this MBean server (" + MBeanServerLocator.getId(server) + ")"
             );
             
          // register the interceptor to server
@@ -178,7 +169,7 @@
          // actually had a chance to register
          throw new InterceptorNameConflictException(
                "A shared interceptor named '" + name + "' already registered " +
-               "to this MBean server (" + AgentID.get(server) + ")"
+               "to this MBean server (" + MBeanServerLocator.getId(server) + ")"
          );
       }
       
@@ -332,10 +323,11 @@
     * @throws MalformedObjectNameException if the object name could not be
     *         created
     */
+   @SuppressWarnings("unchecked")
    protected ObjectName createObjectName() throws MalformedObjectNameException
    {
       // create the object name for this shared interceptor
-      Hashtable props = new Hashtable(2);
+      Hashtable props = new Hashtable(3);
       props.put("type", "Interceptor");
       props.put("name", name);
       props.put("ID", "0");
diff -EbwBru 6.0.0.M1/org/jboss/mx/interceptor/AttributeDispatcher.java trunk/org/jboss/mx/interceptor/AttributeDispatcher.java
--- 6.0.0.M1/org/jboss/mx/interceptor/AttributeDispatcher.java	2009-11-30 14:39:21.000000000 -0600
+++ trunk/org/jboss/mx/interceptor/AttributeDispatcher.java	2009-12-10 12:42:27.000000000 -0600
@@ -37,7 +37,7 @@
  * getter and setter dispatch.
  * 
  * @author Scott.Stark@jboss.org
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  */
 public class AttributeDispatcher
    extends ReflectedDispatcher
@@ -57,7 +57,7 @@
     * with a null args value.
     * 
     * @return the result of the attribute accessor invocation
-    * @throws InvocationException
+    * @throws Throwable for any error
     */ 
    public Object invoke(Invocation invocation) throws Throwable
    {
@@ -144,7 +144,7 @@
       return value;
    }
    
-   protected void checkAssignable(String context, Class clazz, Object value) throws InvalidAttributeValueException, ClassNotFoundException
+   protected void checkAssignable(String context, Class<?> clazz, Object value) throws InvalidAttributeValueException, ClassNotFoundException
    {
       if (value != null && clazz.isAssignableFrom(value.getClass()) == false)
          throw new InvalidAttributeValueException(context + " has class " + value.getClass() + " loaded from " + value.getClass().getClassLoader() +
diff -EbwBru 6.0.0.M1/org/jboss/mx/interceptor/DynamicInterceptor.java trunk/org/jboss/mx/interceptor/DynamicInterceptor.java
--- 6.0.0.M1/org/jboss/mx/interceptor/DynamicInterceptor.java	2009-11-30 14:39:21.000000000 -0600
+++ trunk/org/jboss/mx/interceptor/DynamicInterceptor.java	2009-12-10 12:42:27.000000000 -0600
@@ -29,7 +29,7 @@
  * for dynamically adding and removing interceptors to an MBean.
  *
  * @author <a href="mailto:dimitris@jboss.org">Dimitris Andreadis</a>.
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  */
 public class DynamicInterceptor extends AbstractInterceptor
 {
@@ -42,6 +42,8 @@
    
    /**
     * CTOR
+    * 
+    * @param invoker the invoker
     */
    public DynamicInterceptor(MBeanInvoker invoker)
    {
diff -EbwBru 6.0.0.M1/org/jboss/mx/interceptor/Interceptor.java trunk/org/jboss/mx/interceptor/Interceptor.java
--- 6.0.0.M1/org/jboss/mx/interceptor/Interceptor.java	2009-11-30 14:39:21.000000000 -0600
+++ trunk/org/jboss/mx/interceptor/Interceptor.java	2009-12-10 12:42:27.000000000 -0600
@@ -31,7 +31,7 @@
  * @see org.jboss.mx.interceptor.AbstractInterceptor
  *
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
- * @version $Revision: 81026 $   
+ * @version $Revision: 85671 $   
  */
 public interface Interceptor
 {
@@ -40,6 +40,8 @@
     * Returns the name of this interceptor. Notice that for shared interceptors
     * this name must be unique among the shared interceptors in the MBean
     * server.
+    * 
+    * @return the name
     */
    String getName();
    
@@ -57,6 +59,10 @@
    /**
     * The <tt>invoke</tt> method is called when the invocation object passes
     * this interceptor.
+    * 
+    * @param invocation the invocation
+    * @return the object
+    * @throws Throwable for any error 
     */
    Object invoke(Invocation invocation) throws Throwable;
 
@@ -70,6 +76,8 @@
     * as they are invoked by several different MBean invokers. To access the
     * log implementation of the originating invoker for a particular invocation,
     * an interceptor may query they invocation context for invoker reference.
+    *
+    * @param log the log to set
     */
    void setLogger(Logger log);
 
diff -EbwBru 6.0.0.M1/org/jboss/mx/interceptor/InterceptorNameConflictException.java trunk/org/jboss/mx/interceptor/InterceptorNameConflictException.java
--- 6.0.0.M1/org/jboss/mx/interceptor/InterceptorNameConflictException.java	2009-11-30 14:39:21.000000000 -0600
+++ trunk/org/jboss/mx/interceptor/InterceptorNameConflictException.java	2009-12-10 12:42:27.000000000 -0600
@@ -28,13 +28,13 @@
  * @see org.jboss.mx.interceptor.AbstractInterceptor
  *
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  */
 public class InterceptorNameConflictException
    extends Exception
 {
-
-   // Constructors --------------------------------------------------
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -696843094576327612L;
    
    public InterceptorNameConflictException()
    {
diff -EbwBru 6.0.0.M1/org/jboss/mx/interceptor/ModelMBeanAttributeInterceptor.java trunk/org/jboss/mx/interceptor/ModelMBeanAttributeInterceptor.java
--- 6.0.0.M1/org/jboss/mx/interceptor/ModelMBeanAttributeInterceptor.java	2009-11-30 14:39:21.000000000 -0600
+++ trunk/org/jboss/mx/interceptor/ModelMBeanAttributeInterceptor.java	2009-12-10 12:42:27.000000000 -0600
@@ -26,7 +26,6 @@
 import javax.management.InvalidAttributeValueException;
 import javax.management.ObjectName;
 
-import org.jboss.logging.Logger;
 import org.jboss.mx.modelmbean.ModelMBeanConstants;
 import org.jboss.mx.modelmbean.ModelMBeanInvoker;
 import org.jboss.mx.server.Invocation;
@@ -39,16 +38,12 @@
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
  * @author Scott.Stark@jboss.org
  * @author  <a href="mailto:dimitris@jboss.org">Dimitris Andreadis</a>.
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  */
 public class ModelMBeanAttributeInterceptor
       extends AbstractInterceptor
       implements ModelMBeanConstants
 {
-   // Constants -----------------------------------------------------
-
-   private static final Logger log = Logger.getLogger(ModelMBeanAttributeInterceptor.class);
-   
    // Attributes ----------------------------------------------------
    
    private boolean trace = log.isTraceEnabled();
@@ -67,7 +62,7 @@
    {
       // get the attribute's descriptor
       Descriptor d = invocation.getDescriptor();
-      Class clazz = invocation.getAttributeTypeClass();
+      Class<?> clazz = invocation.getAttributeTypeClass();
       
       String name = null;
       ObjectName objectName = null;
@@ -223,7 +218,7 @@
          throw new UnreachableStatementException(invocation.getType());
    }
    
-   protected void checkAssignable(String context, Class clazz, Object value) throws InvalidAttributeValueException, ClassNotFoundException
+   protected void checkAssignable(String context, Class<?> clazz, Object value) throws InvalidAttributeValueException, ClassNotFoundException
    {
       if (value != null && clazz.isAssignableFrom(value.getClass()) == false)
          throw new InvalidAttributeValueException(context + " has class " + value.getClass() + " loaded from " + value.getClass().getClassLoader() +
diff -EbwBru 6.0.0.M1/org/jboss/mx/interceptor/ModelMBeanInfoInterceptor.java trunk/org/jboss/mx/interceptor/ModelMBeanInfoInterceptor.java
--- 6.0.0.M1/org/jboss/mx/interceptor/ModelMBeanInfoInterceptor.java	2009-11-30 14:39:21.000000000 -0600
+++ trunk/org/jboss/mx/interceptor/ModelMBeanInfoInterceptor.java	2009-12-10 12:42:27.000000000 -0600
@@ -30,7 +30,7 @@
  *
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
  * @author Scott.Stark@jboss.org
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  */
 public class ModelMBeanInfoInterceptor extends AbstractInterceptor
 {
@@ -47,8 +47,8 @@
    /** Return the MBeanInfo from the invocation MBeanInvoker
     * 
     * @param invocation
-    * @return
-    * @throws InvocationException
+    * @return the value
+    * @throws Throwable for any error
     */ 
    public Object invoke(Invocation invocation) throws Throwable
    {
diff -EbwBru 6.0.0.M1/org/jboss/mx/interceptor/ModelMBeanOperationInterceptor.java trunk/org/jboss/mx/interceptor/ModelMBeanOperationInterceptor.java
--- 6.0.0.M1/org/jboss/mx/interceptor/ModelMBeanOperationInterceptor.java	2009-11-30 14:39:21.000000000 -0600
+++ trunk/org/jboss/mx/interceptor/ModelMBeanOperationInterceptor.java	2009-12-10 12:42:27.000000000 -0600
@@ -35,7 +35,7 @@
  *
  * @author  <a href="mailto:adrian@jboss.org">Adrian Brock</a>.
  * @author Scott.Stark@jboss.org
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  */
 public class ModelMBeanOperationInterceptor
       extends AbstractInterceptor
@@ -62,7 +62,7 @@
    {
       // get the operation's descriptor
       Descriptor d = invocation.getDescriptor();
-      Class clazz = invocation.getReturnTypeClass();
+      Class<?> clazz = invocation.getReturnTypeClass();
       
       String name = null;
       ObjectName objectName = null;
@@ -153,7 +153,7 @@
       return value;
    }
    
-   protected void checkAssignable(String context, Class clazz, Object value) throws InvalidAttributeValueException, ClassNotFoundException
+   protected void checkAssignable(String context, Class<?> clazz, Object value) throws InvalidAttributeValueException, ClassNotFoundException
    {
       if (value != null && clazz.isAssignableFrom(value.getClass()) == false)
          throw new InvalidAttributeValueException(context + " has class " + value.getClass() + " loaded from " + value.getClass().getClassLoader() +
diff -EbwBru 6.0.0.M1/org/jboss/mx/interceptor/PersistenceInterceptor.java trunk/org/jboss/mx/interceptor/PersistenceInterceptor.java
--- 6.0.0.M1/org/jboss/mx/interceptor/PersistenceInterceptor.java	2009-11-30 14:39:21.000000000 -0600
+++ trunk/org/jboss/mx/interceptor/PersistenceInterceptor.java	2009-12-10 12:42:27.000000000 -0600
@@ -45,16 +45,16 @@
  * @author  Scott.Stark@jboss.org
  * @author  <a href="mailto:dimitris@jboss.org">Dimitris Andreadis</a>.
  * 
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  */
 public class PersistenceInterceptor
    extends AbstractInterceptor
    implements ModelMBeanConstants, ServiceConstants
 {
    /** The HashMap<name, policy> of attribute level policies */
-   private HashMap attrPersistencePolicies = new HashMap();
+   private HashMap<String, String> attrPersistencePolicies = new HashMap<String, String>();
    /** The HashMap<name, PersistenceTimerTask> of scheduled peristence */
-   private HashMap timerTaskMap = new HashMap();
+   private HashMap<String, PersistenceTimerTask> timerTaskMap = new HashMap<String, PersistenceTimerTask>();
    /** The bean level peristence policy */
    private String mbeanPersistencePolicy;
    /** The PersistentMBean load/store callback interface */
@@ -79,7 +79,7 @@
          return returnValue;
 
       String attrName = invocation.getName();
-      String policy = (String)attrPersistencePolicies.get(attrName);
+      String policy = attrPersistencePolicies.get(attrName);
       if (policy == null)
          policy = mbeanPersistencePolicy;
 
@@ -92,7 +92,7 @@
       }
       else if(policy.equalsIgnoreCase(PP_NO_MORE_OFTEN_THAN) == true)
       {
-         PersistenceTimerTask task = (PersistenceTimerTask) timerTaskMap.get(attrName);
+         PersistenceTimerTask task = timerTaskMap.get(attrName);
          if( task != null )
             task.setHasUpdated(true);
       }
@@ -162,10 +162,10 @@
    {
       boolean noMoreOftenThan;
       boolean hasUpdated;
-      String name;
+      String taskName;
       PersistenceTimerTask(String name, boolean noMoreOftenThan)
       {
-         this.name = name;
+         this.taskName = name;
          this.noMoreOftenThan = noMoreOftenThan;
       }
       synchronized void setHasUpdated(boolean flag)
diff -EbwBru 6.0.0.M1/org/jboss/mx/interceptor/ReflectedDispatcher.java trunk/org/jboss/mx/interceptor/ReflectedDispatcher.java
--- 6.0.0.M1/org/jboss/mx/interceptor/ReflectedDispatcher.java	2009-11-30 14:39:21.000000000 -0600
+++ trunk/org/jboss/mx/interceptor/ReflectedDispatcher.java	2009-12-10 12:42:27.000000000 -0600
@@ -39,7 +39,7 @@
  *
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
  * @author Scott.Stark@jboss.org
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  *   
  */
 public class ReflectedDispatcher extends AbstractInterceptor
@@ -104,7 +104,7 @@
                target = descriptorTarget;
 
                // Determine the method
-               Class clazz = null;
+               Class<?> clazz = null;
                String className = (String) descriptor.getFieldValue(ModelMBeanConstants.CLASS);
                if (className == null)
                   className = opClass;
@@ -122,7 +122,7 @@
                      throw new ReflectionException(e, "Error loading class for operation " + opName);
                   }
                }
-               Class[] sig;
+               Class<?>[] sig;
                try
                {
                   sig = invocation.getSignatureClasses();
diff -EbwBru 6.0.0.M1/org/jboss/mx/loading/BasicLoaderRepository.java trunk/org/jboss/mx/loading/BasicLoaderRepository.java
--- 6.0.0.M1/org/jboss/mx/loading/BasicLoaderRepository.java	2009-11-30 14:38:49.000000000 -0600
+++ trunk/org/jboss/mx/loading/BasicLoaderRepository.java	2009-12-10 12:42:46.000000000 -0600
@@ -38,7 +38,7 @@
  * @see org.jboss.mx.loading.LoaderRepository
  *
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
- * @version $Revision: 81022 $
+ * @version $Revision: 85671 $
  */   
 public class BasicLoaderRepository 
    extends LoaderRepository
@@ -54,7 +54,7 @@
     * @return the found class
     * @exception ClassNotFoundException when there is no such class
     */
-   public Class loadClass(String className) throws ClassNotFoundException
+   public Class<?> loadClass(String className) throws ClassNotFoundException
    {
       return loadClassWithout(null, className);
    }
@@ -68,7 +68,7 @@
     * @return the found class
     * @exception ClassNotFoundException when there is no such class
     */
-   public Class loadClassWithout(ClassLoader skipLoader, String className) throws ClassNotFoundException
+   public Class<?> loadClassWithout(ClassLoader skipLoader, String className) throws ClassNotFoundException
    {
       // try ctx cl first
       ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
@@ -84,10 +84,10 @@
          }
       }
 
-      Iterator it = loaders.iterator();
+      Iterator<ClassLoader> it = loaders.iterator();
       while (it.hasNext())
       {
-         ClassLoader cl = (ClassLoader) it.next();
+         ClassLoader cl = it.next();
          if (cl != skipLoader)
          {
             try
@@ -102,7 +102,7 @@
       }
 
       // at last try a native
-      Class clazz = getNativeClassForName(className);
+      Class<?> clazz = getNativeClassForName(className);
       if (clazz != null) return clazz;
 
       throw new ClassNotFoundException(className);
@@ -121,12 +121,12 @@
     * @throws ClassNotFoundException if none of the consulted classloaders were
     *         able to load the requested class
     */
-   public Class loadClassBefore(ClassLoader stop, String className) throws ClassNotFoundException
+   public Class<?> loadClassBefore(ClassLoader stop, String className) throws ClassNotFoundException
    {
-      Iterator it = loaders.iterator();
+      Iterator<ClassLoader> it = loaders.iterator();
       while (it.hasNext())
       {
-         ClassLoader cl = (ClassLoader) it.next();
+         ClassLoader cl = it.next();
          if (cl == stop)
             break;
 
@@ -141,7 +141,7 @@
       }
 
       // at last try a native
-      Class clazz = getNativeClassForName(className);
+      Class<?> clazz = getNativeClassForName(className);
       if (clazz != null) return clazz;
 
       throw new ClassNotFoundException(className);
@@ -179,7 +179,7 @@
          this.addClassLoader(ucl);
       return ucl;
    }
-   public Class loadClass(String name, boolean resolve, ClassLoader cl)
+   public Class<?> loadClass(String name, boolean resolve, ClassLoader cl)
       throws ClassNotFoundException
    {
       throw new ClassNotFoundException("loadClass(String,boolean,ClassLoader) not supported");
@@ -198,9 +198,9 @@
       }
       return res;
    }
-   public void getResources(String name, ClassLoader cl, List urls)
+   public void getResources(String name, ClassLoader cl, List<URL> urls)
    {
-      Enumeration resURLs = null;
+      Enumeration<URL> resURLs = null;
       try
       {
          if( cl instanceof unifiedClassLoader )
diff -EbwBru 6.0.0.M1/org/jboss/mx/loading/ClassLoaderUtils.java trunk/org/jboss/mx/loading/ClassLoaderUtils.java
--- 6.0.0.M1/org/jboss/mx/loading/ClassLoaderUtils.java	2009-11-30 14:38:49.000000000 -0600
+++ trunk/org/jboss/mx/loading/ClassLoaderUtils.java	2009-12-10 12:42:46.000000000 -0600
@@ -50,8 +50,9 @@
 /** Utility methods for class loader to package names, etc.
  *
  * @author Scott.Stark@jboss.org
- * @version $Revision: 81022 $
+ * @version $Revision: 85671 $
  */
+@SuppressWarnings("unchecked")
 public class ClassLoaderUtils
 {
    private static Logger log = Logger.getLogger(ClassLoaderUtils.class);
@@ -109,6 +110,9 @@
    /** Use reflection to access a URL[] getURLs or URL[] getClasspath method so
     that non-URLClassLoader class loaders, or class loaders that override
     getURLs to return null or empty, can provide the true classpath info.
+    
+    @param cl the classloader
+    @return the urls
     */
    public static URL[] getClassLoaderURLs(ClassLoader cl)
    {
@@ -177,6 +181,9 @@
 
    /** Parse a class name into its package prefix. This has to handle
       array classes whose name is prefixed with [L.
+      
+      @param className the class name
+      @return the package name
     */
    public static String getPackageName(String className)
    {
@@ -197,6 +204,9 @@
 
    /** Parse a class name into its resource form. This has to handle
       array classes whose name is prefixed with [L.
+      
+      @param className the class name
+      @return the resource name
     */
    public static String getResourceName(String className)
    {
@@ -220,9 +230,9 @@
     * 
     * @return the new package set
     */
-   public static Set newPackageSet()
+   public static Set<ClassLoader> newPackageSet()
    {
-      return new TreeSet(repositoryClassLoaderComparator);
+      return new TreeSet<ClassLoader>(repositoryClassLoaderComparator);
    }
 
    /**
@@ -238,11 +248,8 @@
    }
       
    /** Augment the package name associated with a UCL.
-    * @param cl the UCL that loads from url
-    * @param packagesMap the Map<cl, String[]> to update
     * @param url the URL to parse for package names
-    * @param prevPkgNames the set of pckage names already associated with cl
-    * @return the updated unique set of package names
+    * @param listener the listener
     * @throws Exception
     */
    public static void updatePackageMap(URL url, PkgNameListener listener)
diff -EbwBru 6.0.0.M1/org/jboss/mx/loading/ClassLoadingTask.java trunk/org/jboss/mx/loading/ClassLoadingTask.java
--- 6.0.0.M1/org/jboss/mx/loading/ClassLoadingTask.java	2009-11-30 14:38:49.000000000 -0600
+++ trunk/org/jboss/mx/loading/ClassLoadingTask.java	2009-12-10 12:42:46.000000000 -0600
@@ -30,12 +30,12 @@
 
 /** An encapsulation of a UCL3.loadClass task.
  * @author Scott.Stark@jboss.org
- * @version $Revision: 63210 $
+ * @version $Revision: 85671 $
 */
 public class ClassLoadingTask
 {
    protected static Logger log = Logger.getLogger(ClassLoadingTask.class);
-   protected static Comparator taskComparator = new ThreadTaskComparator();
+   protected static Comparator<ThreadTask> taskComparator = new ThreadTaskComparator();
 
    public static final int FOUND_CLASS_LOADER = 1;
    public static final int NEXT_EVENT = 2;
@@ -45,7 +45,7 @@
    protected String classname;
    protected Thread requestingThread;
    protected RepositoryClassLoader requestingClassLoader;
-   protected Class loadedClass;
+   protected Class<?> loadedClass;
    protected int loadOrder = Integer.MAX_VALUE;
    protected int stopOrder = Integer.MAX_VALUE;
    protected Throwable loadException;
@@ -61,12 +61,10 @@
    /** Compare ThreadTask first based on their order ivar, and then the
     * relative ordering with which their UCLs were added to the ULR.
     */
-   static class ThreadTaskComparator implements Comparator
+   static class ThreadTaskComparator implements Comparator<ThreadTask>
    {
-      public int compare(Object o1, Object o2)
+      public int compare(ThreadTask t1, ThreadTask t2)
       {
-         ThreadTask t1 = (ThreadTask) o1;
-         ThreadTask t2 = (ThreadTask) o2;
          int compare = t1.order - t2.order;
          if( compare == 0 )
          {
@@ -112,7 +110,7 @@
       {
          return classname;
       }
-      Class getLoadedClass()
+      Class<?> getLoadedClass()
       {
          return loadedClass;
       }
@@ -123,7 +121,7 @@
 
       void run() throws ClassNotFoundException
       {
-         Class theClass = null;
+         Class<?> theClass = null;
          try
          {
             if( loadedClass == null )
@@ -213,7 +211,7 @@
     * of the load attempt. This must decrement the threadTaskCount or
     * the ClassLoadingTask will never complete.
     */
-   private synchronized void setLoadedClass(Class theClass, int order)
+   private synchronized void setLoadedClass(Class<?> theClass, int order)
    {
       this.threadTaskCount --;
       if( trace )
diff -EbwBru 6.0.0.M1/org/jboss/mx/loading/ClassPreloadService.java trunk/org/jboss/mx/loading/ClassPreloadService.java
--- 6.0.0.M1/org/jboss/mx/loading/ClassPreloadService.java	2009-11-30 14:38:49.000000000 -0600
+++ trunk/org/jboss/mx/loading/ClassPreloadService.java	2009-12-10 12:42:46.000000000 -0600
@@ -72,7 +72,7 @@
    </mbean>
 
  @author Scott.Stark@jboss.org
- @version $Revision: 81022 $
+ @version $Revision: 85671 $
  */
 public class ClassPreloadService
 {
@@ -155,7 +155,7 @@
                   String cname = name.replace('/', '.').substring(0, length - 6);
                   try
                   {
-                     Class c = loader.loadClass(cname);
+                     loader.loadClass(cname);
                      loadedClasses ++;
                      if (trace)
                         log.trace("loaded class: " + cname);
@@ -179,6 +179,7 @@
       log.info("Loaded "+loadedClasses+" classes, "+loadErrors+" CNFEs");
    }
 
+   @SuppressWarnings("unchecked")
    public Pattern[] compileIncludes()
    {
       ArrayList tmp = new ArrayList();
@@ -193,6 +194,7 @@
       tmp.toArray(includes);
       return includes;
    }
+   @SuppressWarnings("unchecked")
    public Pattern[] compileExcludes()
    {
       ArrayList tmp = new ArrayList();
@@ -208,6 +210,7 @@
       return includes;
    }
 
+   @SuppressWarnings("unchecked")
    public URL[] filterCP(URL[] rawCP, Pattern[] includes, Pattern[] excludes)
    {
       if( trace )
diff -EbwBru 6.0.0.M1/org/jboss/mx/loading/ClassToStringAction.java trunk/org/jboss/mx/loading/ClassToStringAction.java
--- 6.0.0.M1/org/jboss/mx/loading/ClassToStringAction.java	2009-11-30 14:31:25.000000000 -0600
+++ trunk/org/jboss/mx/loading/ClassToStringAction.java	2009-12-10 12:42:46.000000000 -0600
@@ -28,14 +28,14 @@
 /** An encapsulation creating a to string rep for a class using a
  * PrivilegedAction for getting the ProtectionDomain.
  * 
- * @version $Revision: 81019 $
+ * @version $Revision: 86129 $
  * @author Scott.Stark@jboss.org
  */
-class ClassToStringAction implements PrivilegedAction
+class ClassToStringAction implements PrivilegedAction<Object>
 {
    private StringBuffer buffer;
-   private Class clazz;
-   ClassToStringAction(Class clazz, StringBuffer buffer)
+   private Class<?> clazz;
+   ClassToStringAction(Class<?> clazz, StringBuffer buffer)
    {
       this.clazz = clazz;
       this.buffer = buffer;
@@ -56,13 +56,13 @@
       return null;
    }
 
-   static void toString(Class clazz, StringBuffer buffer)
+   static void toString(Class<?> clazz, StringBuffer buffer)
    {
-      PrivilegedAction action = new ClassToStringAction(clazz, buffer);
+      ClassToStringAction action = new ClassToStringAction(clazz, buffer);
       AccessController.doPrivileged(action);
    }
 
-   static class SysPropertyAction implements PrivilegedAction
+   static class SysPropertyAction implements PrivilegedAction<String>
    {
       private String key;
       private String def;
@@ -71,15 +71,15 @@
          this.key = key;
          this.def = def;
       }
-      public Object run()
+      public String run()
       {
          return System.getProperty(key, def);
       }
    }
    static String getProperty(String key, String def)
    {
-      PrivilegedAction action = new SysPropertyAction(key, def);
-      String value = (String) AccessController.doPrivileged(action);
+      SysPropertyAction action = new SysPropertyAction(key, def);
+      String value = AccessController.doPrivileged(action);
       return value;
    }
 }
diff -EbwBru 6.0.0.M1/org/jboss/mx/loading/HeirarchicalLoaderRepository3.java trunk/org/jboss/mx/loading/HeirarchicalLoaderRepository3.java
--- 6.0.0.M1/org/jboss/mx/loading/HeirarchicalLoaderRepository3.java	2009-11-30 14:38:49.000000000 -0600
+++ trunk/org/jboss/mx/loading/HeirarchicalLoaderRepository3.java	2009-12-10 12:42:46.000000000 -0600
@@ -43,7 +43,7 @@
  * first and then the parent depending on the java2ParentDelegation flag.
  *
  * @author Scott.Stark@jboss.org
- * @version $Revision: 81022 $
+ * @version $Revision: 85671 $
  */
 public class HeirarchicalLoaderRepository3 extends UnifiedLoaderRepository3
 {
@@ -62,7 +62,7 @@
       /** Override to always return null to force the UCL to only load from
        * its URLs.
        * @param name
-       * @return
+       * @return the url
        */
       public URL getResource(String name)
       {
@@ -75,7 +75,7 @@
        * @return nothing
        * @throws ClassNotFoundException always
        */ 
-      protected synchronized Class loadClass(String name, boolean resolve)
+      protected synchronized Class<?> loadClass(String name, boolean resolve)
             throws ClassNotFoundException
       {
          throw new ClassNotFoundException("NoParentClassLoader has no classes");
@@ -83,26 +83,26 @@
       /** Override to always throw a CNFE to force the UCL to only load from
        * its URLs.
        * @param name
-       * @return
+       * @return the class
        * @throws ClassNotFoundException
        */ 
-      protected Class findClass(String name) throws ClassNotFoundException
+      protected Class<?> findClass(String name) throws ClassNotFoundException
       {
          throw new ClassNotFoundException("NoParentClassLoader has no classes");
       }
    }
    static class CacheClassLoader extends UnifiedClassLoader3
    {
-      Class cacheClass;
-      CacheClassLoader(Class cacheClass, LoaderRepository rep)
+      Class<?> cacheClass;
+      CacheClassLoader(Class<?> cacheClass, LoaderRepository rep)
       {
          super(null, null, new NoParentClassLoader(), rep);
          this.cacheClass = cacheClass;
       }
 
-      protected Class findClass(String name) throws ClassNotFoundException
+      protected Class<?> findClass(String name) throws ClassNotFoundException
       {
-         Class c = cacheClass;
+         Class<?> c = cacheClass;
          if( name.equals(cacheClass.getName()) == false )
             c = null;
          return c;
@@ -246,10 +246,10 @@
     * @return The loaded class
     * @throws ClassNotFoundException If the class could not be found.
     */
-   public Class loadClass(String name, boolean resolve, ClassLoader scl)
+   public Class<?> loadClass(String name, boolean resolve, ClassLoader scl)
       throws ClassNotFoundException
    {
-      Class foundClass = null;
+      Class<?> foundClass = null;
 
       if( java2ParentDelegation == true )
       {
@@ -298,9 +298,9 @@
     * @param classname
     * @return the cached class if found, null otherwise
     */ 
-   public Class getCachedClass(String classname)
+   public Class<?> getCachedClass(String classname)
    {
-      Class clazz = null;
+      Class<?> clazz = null;
       if( java2ParentDelegation == true )
       {
          // Try the parent repository
@@ -365,7 +365,7 @@
     * @param cl the requesting class loader
     * @param urls a list into which the located resource URLs will be placed
     */
-   public void getResources(String name, ClassLoader cl, List urls)
+   public void getResources(String name, ClassLoader cl, List<URL> urls)
    {
       if( java2ParentDelegation == true )
       {
@@ -401,9 +401,9 @@
     * first to this repository and then the parent repository.
     *@return the cached class if found, null otherwise
     */
-   public Class loadClassFromCache(String name)
+   public Class<?> loadClassFromCache(String name)
    {
-      Class foundClass = null;
+      Class<?> foundClass = null;
 
       if( java2ParentDelegation == true )
       {
@@ -429,7 +429,8 @@
     * the parent repository pkg class loaders
     *@return Set<PkgClassLoader>
     */
-   public Set getPackageClassLoaders(String name)
+   @SuppressWarnings("unchecked")
+   public Set<ClassLoader> getPackageClassLoaders(String name)
    {
       Set pkgSet = super.getPackageClassLoaders(name);
       Set parentPkgSet = parentRepository.getPackageClassLoaders(name);
@@ -483,6 +483,7 @@
       return resource;
    }
 
+   @SuppressWarnings("unchecked")
    private class GetClassLoadersAction implements PrivilegedAction
    {
       private String name;
diff -EbwBru 6.0.0.M1/org/jboss/mx/loading/LoaderRepositoryFactory.java trunk/org/jboss/mx/loading/LoaderRepositoryFactory.java
--- 6.0.0.M1/org/jboss/mx/loading/LoaderRepositoryFactory.java	2009-11-30 14:31:25.000000000 -0600
+++ trunk/org/jboss/mx/loading/LoaderRepositoryFactory.java	2009-12-10 12:42:46.000000000 -0600
@@ -43,7 +43,7 @@
  *
  * @author <a href="mailto:d_jencks@users.sourceforge.net">David Jencks</a>
  * @author Scott.Stark@jboss.org
- * @version $Revision: 81019 $
+ * @version $Revision: 86129 $
  */
 public class LoaderRepositoryFactory
 {
@@ -51,7 +51,7 @@
    public static ObjectName DEFAULT_LOADER_REPOSITORY;
    private static Logger log = Logger.getLogger(LoaderRepositoryFactory.class);
    /** A HashMap<ObjectName, Integer> for the active references to LoaderRepositorys */
-   private static HashMap referenceCountMap = new HashMap();
+   private static HashMap<ObjectName, Integer> referenceCountMap = new HashMap<ObjectName, Integer>();
 
    static
    {
@@ -117,6 +117,7 @@
     create a LoaderRepositoryConfig representation.
     @param config the xml loader-repository element
     @return a LoaderRepositoryConfig representation of the config
+    @throws MalformedObjectNameException for a bad object name
     */
    public static LoaderRepositoryConfig parseRepositoryConfig(Element config)
       throws MalformedObjectNameException
@@ -225,9 +226,9 @@
          try
          {
             // Create the repository loader
-            Class repositoryClass = loader.loadClass(repositoryClassName);
-            Class[] ctorSig = {MBeanServer.class, ObjectName.class};
-            Constructor ctor = repositoryClass.getConstructor(ctorSig);
+            Class<?> repositoryClass = loader.loadClass(repositoryClassName);
+            Class<?>[] ctorSig = {MBeanServer.class, ObjectName.class};
+            Constructor<?> ctor = repositoryClass.getConstructor(ctorSig);
             Object[] args = {server, DEFAULT_LOADER_REPOSITORY};
             repository = (LoaderRepository) ctor.newInstance(args);
             server.registerMBean(repository, repositoryName);
@@ -243,7 +244,7 @@
             // Configure the repository
             if( config.configParserClassName != null && config.repositoryConfig != null )
             {
-               Class parserClass = loader.loadClass(config.configParserClassName);
+               Class<?> parserClass = loader.loadClass(config.configParserClassName);
                LoaderRepositoryConfigParser parser = (LoaderRepositoryConfigParser)
                   parserClass.newInstance();
                parser.configure(repository, config.repositoryConfig);
@@ -256,7 +257,7 @@
          }
       } // end of try-catch
 
-      Integer activeCount = (Integer) referenceCountMap.get(repositoryName);
+      Integer activeCount = referenceCountMap.get(repositoryName);
       if( activeCount == null )
          activeCount = new Integer(1);
       else
@@ -271,7 +272,7 @@
       {
          try
          {
-            Integer activeCount = (Integer) referenceCountMap.get(repositoryName);
+            Integer activeCount = referenceCountMap.get(repositoryName);
             if( activeCount != null )
             {
                if( activeCount.intValue() == 1 )
diff -EbwBru 6.0.0.M1/org/jboss/mx/loading/LoaderRepository.java trunk/org/jboss/mx/loading/LoaderRepository.java
--- 6.0.0.M1/org/jboss/mx/loading/LoaderRepository.java	2009-11-30 14:31:25.000000000 -0600
+++ trunk/org/jboss/mx/loading/LoaderRepository.java	2009-12-10 12:42:46.000000000 -0600
@@ -21,7 +21,6 @@
  */
 package org.jboss.mx.loading;
 
-import EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap;
 import org.jboss.logging.Logger;
 import org.jboss.mx.server.ServerConstants;
 import org.jboss.util.loading.Translator;
@@ -31,34 +30,33 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Vector;
+import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * Abstract base class of all loader repository implementations
  * 
- * @see org.jboss.mx.loading.BasicLoaderRepository
- *
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
- * @version $Revision: 81019 $
+ * @version $Revision: 86129 $
  */
 public abstract class LoaderRepository
    implements ServerConstants, ClassLoaderRepository
 {
 
    // Attributes ----------------------------------------------------
-   protected static Vector loaders = new Vector();
+   protected static Vector<ClassLoader> loaders = new Vector<ClassLoader>();
    protected static LoaderRepository instance = null;
    protected Translator translator = null;
 
    /** The loaded classes cache, HashMap<String, Class>.
     * Access synchronized via this.classes monitor.
     */
-   private ConcurrentReaderHashMap classes = new ConcurrentReaderHashMap();
+   private ConcurrentHashMap<String, Class<?>> classes = new ConcurrentHashMap<String, Class<?>>();
 
 
    /**
     * Native signature to class map
     */
-   private static HashMap nativeClassBySignature;
+   private static HashMap<String, Class<?>> nativeClassBySignature;
 
    // Static --------------------------------------------------------
    private static final Logger log = Logger.getLogger(LoaderRepository.class);
@@ -68,7 +66,7 @@
     */
    static
    {
-      nativeClassBySignature = new HashMap();
+      nativeClassBySignature = new HashMap<String, Class<?>>();
       nativeClassBySignature.put("boolean", boolean.class);
       nativeClassBySignature.put("byte", byte.class);
       nativeClassBySignature.put("char", char.class);
@@ -90,7 +88,7 @@
    }
 
    // Public --------------------------------------------------------
-   public Vector getLoaders()
+   public Vector<ClassLoader> getLoaders()
    {
       return loaders;
    }
@@ -100,9 +98,9 @@
       return null;
    }
 
-   public Class getCachedClass(String classname)
+   public Class<?> getCachedClass(String classname)
    {
-       return (Class)classes.get(classname);
+       return classes.get(classname);
    }
 
    public Translator getTranslator()
@@ -139,7 +137,7 @@
     * @return the found class
     * @exception ClassNotFoundException when there is no such class
     */
-   public abstract Class loadClass(String className) throws ClassNotFoundException;
+   public abstract Class<?> loadClass(String className) throws ClassNotFoundException;
 
    /**
     * Loads a class from the repository, excluding the given
@@ -150,7 +148,7 @@
     * @return the found class
     * @exception ClassNotFoundException when there is no such class
     */
-   public abstract Class loadClassWithout(ClassLoader loader, String className) throws ClassNotFoundException;
+   public abstract Class<?> loadClassWithout(ClassLoader loader, String className) throws ClassNotFoundException;
 
    /**
     * Loads a class from the repository, using the classloaders that were
@@ -165,7 +163,7 @@
     * @throws ClassNotFoundException if none of the consulted classloaders were
     *         able to load the requested class
     */
-   public abstract Class loadClassBefore(ClassLoader stop, String className) throws ClassNotFoundException;
+   public abstract Class<?> loadClassBefore(ClassLoader stop, String className) throws ClassNotFoundException;
 
    // END ClassLoaderRepository ****************************************************************************************
 
@@ -196,10 +194,10 @@
     * @param name
     * @param resolve
     * @param cl
-    * @return
+    * @return the class
     * @throws ClassNotFoundException
     */
-   public abstract Class loadClass(String name, boolean resolve, ClassLoader cl)
+   public abstract Class<?> loadClass(String name, boolean resolve, ClassLoader cl)
       throws ClassNotFoundException;
 
    /** Find a resource URL for the given name
@@ -217,9 +215,11 @@
     * @param cl the requesting class loader
     * @param urls a list into which the located resource URLs will be placed
     */
-   public abstract void getResources(String name, ClassLoader cl, List urls);
+   public abstract void getResources(String name, ClassLoader cl, List<URL> urls);
 
    /** Add a class loader to the repository
+    * 
+    * @param cl the classloader
     */
    public abstract void addClassLoader(ClassLoader cl);
    /** Update the set of URLs known to be associated with a previously added
@@ -227,6 +227,7 @@
     *
     * @param cl
     * @param url
+    * @return true if added
     */
    public abstract boolean addClassLoaderURL(ClassLoader cl, URL url);
    /** Remove a cladd loader from the repository.
@@ -236,12 +237,14 @@
 
    /**
     * Return the class of a java native type
+    * 
+    * @param className the className
     * @return the class, or null if className is not a native class name
     */
-   public static final Class getNativeClassForName(String className)
+   public static final Class<?> getNativeClassForName(String className)
    {
       // Check for native classes
-      return (Class)nativeClassBySignature.get(className);
+      return nativeClassBySignature.get(className);
    }
 
    /**
@@ -257,8 +260,12 @@
 
    /**
     * Add a class to the the cache
+    * 
+    * @param name the class name
+    * @param cls the class
+    * @param cl the classloader
     */
-   void cacheLoadedClass(String name, Class cls, ClassLoader cl)
+   void cacheLoadedClass(String name, Class<?> cls, ClassLoader cl)
    {
        synchronized( classes )
        {
diff -EbwBru 6.0.0.M1/org/jboss/mx/loading/LoadMgr3.java trunk/org/jboss/mx/loading/LoadMgr3.java
--- 6.0.0.M1/org/jboss/mx/loading/LoadMgr3.java	2009-11-30 14:38:49.000000000 -0600
+++ trunk/org/jboss/mx/loading/LoadMgr3.java	2009-12-10 12:42:46.000000000 -0600
@@ -41,8 +41,9 @@
  * class loading tasks.
  *
  * @author Scott.Stark@jboss.org
- * @version $Revision: 93301 $
+ * @version $Revision: 85671 $
  */
+@SuppressWarnings("unchecked")
 public class LoadMgr3
 {
    private static Logger log = Logger.getLogger(LoadMgr3.class);
@@ -116,6 +117,9 @@
    /** Register that a thread owns the UCL3.loadClass monitor. This is called
     * from within UCL3.loadClass(String,boolean) and this method creates
     * entries in the loadClassThreads and loadTasksByThread maps.
+    * 
+    * @param ucl the classloader
+    * @param t the thread
     */
    public static void registerLoaderThread(RepositoryClassLoader ucl, Thread t)
    {
@@ -148,6 +152,8 @@
     * The ThreadTask are assigned to the threads that own the associated UCL3
     * monitor. If no class loader serves the class package, then the requesting
     * class loader is asked if it can load the class.
+    * @param task 
+    * @param repository 
     *
     * @return true if the class could be loaded from the cache or requesting
     * UCL3, false to indicate the calling thread must process the
@@ -335,6 +341,10 @@
     * to be involved. Any thread active in loadClass with the monitor held
     * processes class loading tasks that must be handled by its UCL3. The
     * active set of threads loading classes form a pool of cooperating threads.
+    * @param t 
+    * @param task 
+    * @param repository 
+    * @throws InterruptedException 
     */
    public static void nextTask(Thread t, ClassLoadingTask task,
       UnifiedLoaderRepository3 repository)
@@ -408,19 +418,18 @@
       }
       catch(Throwable e)
       {
-    	 log.trace("Class loading Task Run failed with exception", e);
     	 boolean retry = e instanceof ClassCircularityError
             || e.getClass().equals(LinkageError.class);
          int numCCE = loadTask.incNumCCE();
-         
          if( retry && numCCE <= 10 )
          {
-            log.info("Rescheduling failed Class loading Task");
         	/* Reschedule this task after all existing tasks to allow the
             current load tasks which are conflicting to complete.
             */
             try
             {
+               if( trace )
+                  log.trace("Run failed with exception", e);
                // Reschedule and update the loadTask.threadTaskCount
                scheduleTask(loadTask, ucl3, Integer.MAX_VALUE, true, trace);
             }
@@ -435,7 +444,8 @@
          else
          {
             loadTask.setLoadError(e);
-            log.warn("Not resheduling failed loading task, loadTask="+loadTask, e);
+            if( trace )
+               log.trace("Run failed with exception, loadTask="+loadTask, e);
          }
       }
       finally
@@ -495,6 +505,7 @@
 
    /** Complete a ClassLoadingTask. This is called by UCL3.loadClass to indicate
     * that the thread is existing the loadClass method.
+    * @param task 
     */
    public static void endLoadTask(ClassLoadingTask task)
    {
Only in 6.0.0.M1/org/jboss/mx/loading: MBeanElement.java
Only in 6.0.0.M1/org/jboss/mx/loading: MBeanFileParser.java
Only in 6.0.0.M1/org/jboss/mx/loading: MLetParser.java
diff -EbwBru 6.0.0.M1/org/jboss/mx/loading/MLetRepositoryClassLoader.java trunk/org/jboss/mx/loading/MLetRepositoryClassLoader.java
--- 6.0.0.M1/org/jboss/mx/loading/MLetRepositoryClassLoader.java	2009-11-30 14:38:49.000000000 -0600
+++ trunk/org/jboss/mx/loading/MLetRepositoryClassLoader.java	2009-12-10 12:42:46.000000000 -0600
@@ -32,7 +32,7 @@
  * A RepositoryClassLoader that wraps an MLet.
  * 
  * @author <a href="adrian@jboss.com">Adrian Brock</a>
- * @version $Revision: 81022 $
+ * @version $Revision: 85671 $
  */
 class MLetRepositoryClassLoader extends RepositoryClassLoader
 {
@@ -53,8 +53,7 @@
    /**
     * Create a new LoaderRepositoryClassLoader
     * 
-    * @param urls the urls
-    * @param parent the parent classloader
+    * @param mlet the mlet
     */
    protected MLetRepositoryClassLoader(MLet mlet)
    {
@@ -95,7 +94,7 @@
       return repository.getURLs();
    }
    
-   public synchronized Class loadClassImpl(String name, boolean resolve, int stopAt)
+   public synchronized Class<?> loadClassImpl(String name, boolean resolve, int stopAt)
       throws ClassNotFoundException
    {
       loadClassDepth ++;
@@ -138,7 +137,7 @@
       {
          Thread t = Thread.currentThread();
          // Register this thread as owning this UCL
-         if( loadLock.holds() == 1 )
+         if( loadLock.getHoldCount() == 1 )
             LoadMgr3.registerLoaderThread(this, t);
 
          // Create a class loading task and submit it to the repository
@@ -166,7 +165,7 @@
       finally
       {
          // Unregister as the UCL owner to reschedule any remaining load tasks
-         if( loadLock.holds() == 1 )
+         if( loadLock.getHoldCount() == 1 )
             LoadMgr3.endLoadTask(task);
          // Notify any threads waiting to use this UCL
          this.release();
@@ -196,13 +195,13 @@
 
    // URLClassLoader overrides --------------------------------------
 
-   public Class loadClassLocally(String name, boolean resolve)
+   public Class<?> loadClassLocally(String name, boolean resolve)
       throws ClassNotFoundException
    {
       boolean trace = log.isTraceEnabled();
       if( trace )
          log.trace("loadClassLocally, " + this + " name=" + name);
-      Class result = null;
+      Class<?> result = null;
       try
       {
          result = mlet.loadClass(name, null);
diff -EbwBru 6.0.0.M1/org/jboss/mx/loading/RepositoryClassLoader.java trunk/org/jboss/mx/loading/RepositoryClassLoader.java
--- 6.0.0.M1/org/jboss/mx/loading/RepositoryClassLoader.java	2009-11-30 14:31:25.000000000 -0600
+++ trunk/org/jboss/mx/loading/RepositoryClassLoader.java	2009-12-10 12:42:46.000000000 -0600
@@ -37,8 +37,10 @@
 import java.util.Vector;
 import java.util.Collections;
 import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.ReentrantLock;
 
-import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
 
 import org.jboss.classloading.spi.RealClassLoader;
@@ -46,14 +48,11 @@
 import org.jboss.util.loading.Translator;
 import org.jboss.util.collection.SoftSet;
 
-import EDU.oswego.cs.dl.util.concurrent.ReentrantLock;
-import EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap;
-
 /**
  * A RepositoryClassLoader.
  * 
  * @author <a href="adrian@jboss.com">Adrian Brock</a>
- * @version $Revision: 81019 $
+ * @version $Revision: 86129 $
  */
 public abstract class RepositoryClassLoader extends URLClassLoader implements RealClassLoader
 {
@@ -79,11 +78,12 @@
    protected ClassLoader parent = null;
    
    /** Names of classes which have resulted in CNFEs in loadClassLocally */
-   private Set classBlackList = Collections.synchronizedSet(new SoftSet());
+   @SuppressWarnings("unchecked")
+   private Set<String> classBlackList = Collections.synchronizedSet(new SoftSet());
    /** Names of resources that were not found in loadResourceLocally */
-   private Set resourceBlackList = Collections.synchronizedSet(new HashSet());
+   private Set<String> resourceBlackList = Collections.synchronizedSet(new HashSet<String>());
    /** A HashMap<String, URL> for resource found in loadResourceLocally */
-   private ConcurrentReaderHashMap resourceCache = new ConcurrentReaderHashMap();
+   private ConcurrentHashMap<String, URL> resourceCache = new ConcurrentHashMap<String, URL>();
    
    /** Lock */
    protected ReentrantLock loadLock = new ReentrantLock();
@@ -101,6 +101,7 @@
     * @param urls the urls
     * @param parent the parent classloader
     */
+   @SuppressWarnings("unchecked")
    protected RepositoryClassLoader(URL[] urls, ClassLoader parent)
    {
       super(urls, parent);
@@ -109,8 +110,8 @@
       String mode = ClassToStringAction.getProperty("org.jboss.mx.loading.blacklistMode", null);
       if( mode == null || mode.equalsIgnoreCase("HashSet") )
       {
-         classBlackList = Collections.synchronizedSet(new HashSet());
-         resourceBlackList = Collections.synchronizedSet(new HashSet());
+         classBlackList = Collections.synchronizedSet(new HashSet<String>());
+         resourceBlackList = Collections.synchronizedSet(new HashSet<String>());
       }
       else if( mode.equalsIgnoreCase("SoftSet") )
       {
@@ -135,6 +136,8 @@
    
    /**
     * Get the loader repository for this classloader
+    * 
+    * @return the loader repository
     */
    public LoaderRepository getLoaderRepository()
    {
@@ -191,10 +194,7 @@
       this.addedOrder = addedOrder;
    }
 
-   /** 
-    * Called to attempt to load a class from the set of URLs associated with this classloader.
-    */
-   public Class loadClassLocally(String name, boolean resolve)
+   public Class<?> loadClassLocally(String name, boolean resolve)
       throws ClassNotFoundException
    {
       boolean trace = log.isTraceEnabled();
@@ -203,7 +203,7 @@
       if( name == null || name.length() == 0 )
          throw new ClassNotFoundException("Null or empty class name");
 
-      Class result = null;
+      Class<?> result = null;
       try
       {
          if (isClassBlackListed(name))
@@ -252,12 +252,12 @@
       }
    }
 
-   /**
+   /*
    * Provides the same functionality as {@link java.net.URLClassLoader#getResource}.
    */
    public URL getResourceLocally(String name)
    {
-      URL resURL = (URL) resourceCache.get(name);
+      URL resURL = resourceCache.get(name);
       if (resURL != null)
          return resURL;
       if (isResourceBlackListed(name))
@@ -312,6 +312,7 @@
     * Return all library URLs associated with this RepositoryClassLoader
     *
     * <p>Do not remove this method without running the WebIntegrationTestSuite
+    * @return the urls
     */
    public URL[] getAllURLs()
    {
@@ -415,13 +416,13 @@
    *
    * <p>Forwards request to {@link LoaderRepository}.
    */
-   public Class loadClass(String name, boolean resolve)
+   public Class<?> loadClass(String name, boolean resolve)
       throws ClassNotFoundException
    {
       boolean trace = log.isTraceEnabled();
       if (trace)
          log.trace("loadClass " + this + " name=" + name+", loadClassDepth="+loadClassDepth);
-      Class clazz = null;
+      Class<?> clazz = null;
       try
       {
          if (repository != null)
@@ -459,14 +460,17 @@
    * load the class.
    *
    * <p>Forwards request to {@link LoaderRepository}.
+   * @param name the class name
+   * @return the class
+   * @throws ClassNotFoundException when the class is not found
    */
-   public Class loadClassBefore(String name)
+   public Class<?> loadClassBefore(String name)
       throws ClassNotFoundException
    {
       boolean trace = log.isTraceEnabled();
       if (trace)
          log.trace("loadClassBefore " + this + " name=" + name);
-      Class clazz = null;
+      Class<?> clazz = null;
       try
       {
          clazz = loadClassImpl(name, false, addedOrder);
@@ -484,7 +488,7 @@
       }
    }
 
-   public abstract Class loadClassImpl(String name, boolean resolve, int stopAt)
+   public abstract Class<?> loadClassImpl(String name, boolean resolve, int stopAt)
       throws ClassNotFoundException;
 
    /**
@@ -505,9 +509,9 @@
     * @return Enumeration<URL>
     * @throws java.io.IOException
     */
-   public Enumeration findResources(String name) throws IOException
+   public Enumeration<URL> findResources(String name) throws IOException
    {
-      Vector resURLs = new Vector();
+      Vector<URL> resURLs = new Vector<URL>();
       if( repository == null )
       {
          String msg = "Invalid use of destroyed classloader, UCL destroyed at:";
@@ -521,8 +525,12 @@
 
    /**
    * Provides the same functionality as {@link java.net.URLClassLoader#findResources}.
+   * 
+   * @param name the resource name
+   * @return the found resources
+   * @throws IOException for an error accessing the resources
    */
-   public Enumeration findResourcesLocally(String name) throws IOException
+   public Enumeration<URL> findResourcesLocally(String name) throws IOException
    {
       return super.findResources(name);
    }
@@ -534,7 +542,7 @@
      * @return the resulting class
      * @exception ClassNotFoundException if the class could not be found
      */
-   protected Class findClass(String name) throws ClassNotFoundException
+   protected Class<?> findClass(String name) throws ClassNotFoundException
    {
       boolean trace = log.isTraceEnabled();
       if( trace )
@@ -582,7 +590,7 @@
          }
       }
 
-      Class clazz = null;
+      Class<?> clazz = null;
       try
       {
          clazz = findClassLocally(name);
@@ -602,8 +610,9 @@
     * 
     * @param name the name of the class
     * @return the class
+    * @throws ClassNotFoundException when the class is not found
     */
-   protected Class findClassLocally(String name) throws ClassNotFoundException
+   protected Class<?> findClassLocally(String name) throws ClassNotFoundException
    {
       return super.findClass(name);
    }
@@ -725,6 +734,9 @@
     * before a thread enters the class loading task loop in loadClass. This
     * method maintains any interrupted state of the calling thread.
     *@see #loadClass(String, boolean)
+    *
+    * @param waitMS the length of time to wait in milliseconds
+    * @return true when the lock was obtained
     */
    protected boolean attempt(long waitMS)
    {
@@ -734,7 +746,7 @@
       boolean threadWasInterrupted = Thread.interrupted();
       try
       {
-         acquired = loadLock.attempt(waitMS);
+         acquired = loadLock.tryLock(waitMS, TimeUnit.MILLISECONDS);
       }
       catch(InterruptedException e)
       {
@@ -746,7 +758,7 @@
             Thread.currentThread().interrupt();
       }
       if( trace )
-         log.trace("attempt("+loadLock.holds()+") was: "+acquired+" for :"+this);
+         log.trace("attempt("+loadLock.getHoldCount()+") was: "+acquired+" for :"+this);
       return acquired;
    }
    
@@ -756,23 +768,9 @@
     */
    protected void acquire()
    {
-      // Save and clear the interrupted state of the incoming thread
-      boolean threadWasInterrupted = Thread.interrupted();
-      try
-      {
-         loadLock.acquire();
-      }
-      catch(InterruptedException e)
-      {
-      }
-      finally
-      {
-         // Restore the interrupted state of the thread
-         if( threadWasInterrupted )
-            Thread.currentThread().interrupt();
-      }
+      loadLock.lock();
       if( log.isTraceEnabled() )
-         log.trace("acquired("+loadLock.holds()+") for :"+this);
+         log.trace("acquired("+loadLock.getHoldCount()+") for :"+this);
    }
    /** Release the class loading lock previous acquired through the acquire
     * method.
@@ -780,10 +778,10 @@
    protected void release()
    {
       if( log.isTraceEnabled() )
-         log.trace("release("+loadLock.holds()+") for :"+this);
-      loadLock.release();
+         log.trace("release("+loadLock.getHoldCount()+") for :"+this);
+      loadLock.unlock();
       if( log.isTraceEnabled() )
-         log.trace("released, holds: "+loadLock.holds());
+         log.trace("released, holds: "+loadLock.getHoldCount());
    }
 
    /** Obtain the bytecode for the indicated class from this class loaders
@@ -793,6 +791,7 @@
     * @return the bytecode array if found
     * @exception ClassNotFoundException - if the class resource could not
     *    be found
+    * @throws IOException when there is an error loading the class bytes
     */ 
    protected byte[] loadByteCode(String classname)
       throws ClassNotFoundException, IOException
@@ -830,6 +829,7 @@
     * @return the bytecode array if found
     * @exception ClassNotFoundException - if the class resource could not
     *    be found
+    * @throws IOException when there is an error loading the class bytes
     */
    protected byte[] loadByteCode(URL classURL)
       throws ClassNotFoundException, IOException
@@ -861,6 +861,8 @@
    /**
     * Determine the protection domain. If we are a copy of the original
     * deployment, use the original url as the codebase.
+    * 
+    * @param codesourceUrl the codesource url
     * @return the protection domain
     * @todo certificates and principles?
     */
diff -EbwBru 6.0.0.M1/org/jboss/mx/loading/UnifiedClassLoader.java trunk/org/jboss/mx/loading/UnifiedClassLoader.java
--- 6.0.0.M1/org/jboss/mx/loading/UnifiedClassLoader.java	2009-11-30 14:38:49.000000000 -0600
+++ trunk/org/jboss/mx/loading/UnifiedClassLoader.java	2009-12-10 12:42:46.000000000 -0600
@@ -53,7 +53,7 @@
 * @author <a href="scott.stark@jboss.org">Scott Stark</a>
 * @author <a href="juha@jboss.org">Juha Lindfors</a>
 * @author <a href="bill@jboss.org">Bill Burke</a>
-* @version <tt>$Revision: 81022 $</tt>
+* @version <tt>$Revision: 85671 $</tt>
 */
 public class UnifiedClassLoader extends RepositoryClassLoader
    implements UnifiedClassLoaderMBean, Translatable
@@ -207,13 +207,15 @@
    }
    
    /** Get the original URL associated with the UCL. This may be null.
+    * 
+    * @return the url
     */
    public URL getOrigURL()
    {
       return origURL;
    }
    
-   public synchronized Class loadClassImpl(String name, boolean resolve, int stopAt)
+   public synchronized Class<?> loadClassImpl(String name, boolean resolve, int stopAt)
       throws ClassNotFoundException
    {
       loadClassDepth ++;
@@ -278,7 +280,7 @@
       {
          Thread t = Thread.currentThread();
          // Register this thread as owning this UCL
-         if( loadLock.holds() == 1 )
+         if( loadLock.getHoldCount() == 1 )
             LoadMgr3.registerLoaderThread(this, t);
 
          // Create a class loading task and submit it to the repository
@@ -306,7 +308,7 @@
       finally
       {
          // Unregister as the UCL owner to reschedule any remaining load tasks
-         if( loadLock.holds() == 1 )
+         if( loadLock.getHoldCount() == 1 )
             LoadMgr3.endLoadTask(task);
          // Notify any threads waiting to use this UCL
          this.release();
@@ -364,12 +366,12 @@
       PermissionCollection perms = super.getPermissions(permCS);
       PermissionCollection perms2 = super.getPermissions(cs);
       PermissionCollection perms3 = policy.getPermissions(permCS);
-      Enumeration iter = perms2.elements();
+      Enumeration<Permission> iter = perms2.elements();
       while( iter.hasMoreElements() )
-         perms.add((Permission) iter.nextElement());
+         perms.add(iter.nextElement());
       iter = perms3.elements();
       while( iter.hasMoreElements() )
-         perms.add((Permission) iter.nextElement());
+         perms.add(iter.nextElement());
       if( log.isTraceEnabled() )
          log.trace("getPermissions, url="+url+", origURL="+origURL+" -> "+perms);
       return perms;
diff -EbwBru 6.0.0.M1/org/jboss/mx/loading/UnifiedLoaderRepository3.java trunk/org/jboss/mx/loading/UnifiedLoaderRepository3.java
--- 6.0.0.M1/org/jboss/mx/loading/UnifiedLoaderRepository3.java	2009-11-30 14:38:49.000000000 -0600
+++ trunk/org/jboss/mx/loading/UnifiedLoaderRepository3.java	2009-12-10 12:42:46.000000000 -0600
@@ -21,40 +21,38 @@
  */
 package org.jboss.mx.loading;
 
+import java.io.IOException;
 import java.lang.ref.WeakReference;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Enumeration;
 import java.util.Map;
 import java.util.Set;
-import java.util.TreeSet;
-import java.io.IOException;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArraySet;
 
 import javax.management.ListenerNotFoundException;
 import javax.management.MBeanNotificationInfo;
+import javax.management.MBeanRegistration;
+import javax.management.MBeanServer;
 import javax.management.Notification;
 import javax.management.NotificationBroadcaster;
 import javax.management.NotificationFilter;
 import javax.management.NotificationListener;
-import javax.management.MBeanRegistration;
 import javax.management.ObjectName;
-import javax.management.MBeanServer;
 import javax.management.loading.MLet;
 
 import org.jboss.logging.Logger;
 import org.jboss.mx.util.JBossNotificationBroadcasterSupport;
 import org.jboss.util.Classes;
 
-import EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap;
-import EDU.oswego.cs.dl.util.concurrent.CopyOnWriteArraySet;
-
 /** A repository of class loaders that form a flat namespace of classes
  * and resources. This version uses UnifiedClassLoader3 instances. Class
  * and resource loading is synchronized by the acquiring the monitor to the
@@ -63,7 +61,7 @@
  *
  * @author  <a href="mailto:scott.stark@jboss.org">Scott Stark</a>.
  * @author  <a href="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock</a>.
- * @version $Revision: 68584 $
+ * @version $Revision: 85671 $
  * just a hint... xdoclet not really used
  * @jmx.name="JMImplementation:service=UnifiedLoaderRepository,name=Default"
  */
@@ -93,54 +91,54 @@
    /** HashSet<UCL> of classloaders in the repository.
     * Access synchronized via this.classLoaders monitor.
     */
-   private CopyOnWriteArraySet classLoaders = new CopyOnWriteArraySet();
+   private CopyOnWriteArraySet<ClassLoader> classLoaders = new CopyOnWriteArraySet<ClassLoader>();
    /** HashSet<UCL> of class loaders in the repository that have a dynamic
     * URL associated with them. Such a class loader is added to every package
     * class loader set in #getPackageClassLoaders(String).
     */
-   private HashSet dynamicClassLoaders = new HashSet();
+   private HashSet<ClassLoader> dynamicClassLoaders = new HashSet<ClassLoader>();
    /** A HashMap<ClassLoader, UCL> of foreign (non-UCL) classloaders that
     * have been added to the repository as the key and the value the UCL
     * actually used by the ULR.
     * Access synchronized via this.classLoaders monitor.
     */
-   private HashMap nonUCLClassLoader = new HashMap();
+   private HashMap<ClassLoader, ClassLoader> nonUCLClassLoader = new HashMap<ClassLoader, ClassLoader>();
 
    /** A HashSet<URL> used to check for duplicate URLs. Previously this was handled
     by the UCL.equals, but this caused problems with Class.forName(String,
     boolean, ClassLoader) caching.
     Access synchronized via this.classLoaders monitor.
     */
-   private HashSet classLoaderURLs = new HashSet();
+   private HashSet<URL> classLoaderURLs = new HashSet<URL>();
 
    /** The loaded classes cache, HashMap<String, Class>.
     * Access synchronized via this.classes monitor.
     */
-   private ConcurrentReaderHashMap classes = new ConcurrentReaderHashMap();
+   private ConcurrentHashMap<String, Class<?>> classes = new ConcurrentHashMap<String, Class<?>>();
 
    /** HashMap<UCL, HashSet<String>> class loaders to the set of class names
     * loaded via the UCL.
     * Access synchronized via this.classes monitor.
     */
-   private HashMap loaderToClassesMap = new HashMap();
+   private HashMap<ClassLoader, HashSet<String>> loaderToClassesMap = new HashMap<ClassLoader, HashSet<String>>();
 
    /** HashMap<UCL, HashMap<String, URL>> class loaders to the set of
     * resource names they looked up.
     * Access synchronized via this.loaderToResourcesMap monitor.
     */
-   private HashMap loaderToResourcesMap = new HashMap();
+   private HashMap<ClassLoader, HashMap<String, URL>> loaderToResourcesMap = new HashMap<ClassLoader, HashMap<String, URL>>();
 
    /** HashMap<String, ResourceInfo(URL, UCL)> of global resources not unique
     * to a UCL
     * Access synchronized via this.loaderToResourcesMap monitor.
     */
-   private HashMap globalResources = new HashMap();
+   private HashMap<String, ResourceInfo<ClassLoader>> globalResources = new HashMap<String, ResourceInfo<ClassLoader>>();
 
    /** A HashMap<String, Set<UCL>> of package names to the set of
     * ClassLoaders which have classes in the package.
     * Access synchronized via this.packagesMap monitor.
     */
-   private ConcurrentReaderHashMap packagesMap = new ConcurrentReaderHashMap();
+   private ConcurrentHashMap<String, Set<ClassLoader>> packagesMap = new ConcurrentHashMap<String, Set<ClassLoader>>();
 
    /** A HashMap<UCL, String[]> of class loaders to the array of pckages names
     * they serve
@@ -220,16 +218,16 @@
       }
    }
 
-   public Class getCachedClass(String classname)
+   public Class<?> getCachedClass(String classname)
    {
-      return (Class) classes.get(classname);
+      return classes.get(classname);
    }
 
    /** Unlike other implementations of LoaderRepository, this method does
     * nothing but ask the UnifiedClassLoader3 to load the class as UCL3s
     * do not use this method.
     */
-   public Class loadClass(String name, boolean resolve, ClassLoader cl) throws ClassNotFoundException
+   public Class<?> loadClass(String name, boolean resolve, ClassLoader cl) throws ClassNotFoundException
    {
       RepositoryClassLoader rcl = getRepositoryClassLoader(cl, name);
       return rcl.loadClass(name, resolve);
@@ -238,7 +236,7 @@
    /** Called by LoadMgr to obtain all class loaders for the given className
     * @return Set<UnifiedClassLoader3>, may be null
     */
-   public Set getPackageClassLoaders(String className)
+   public Set<ClassLoader> getPackageClassLoaders(String className)
    {
       String pkgName = ClassLoaderUtils.getPackageName(className);
       
@@ -246,10 +244,10 @@
       if (pkgName.startsWith("java."))
          return null;
 
-      Set pkgSet = (Set) packagesMap.get(pkgName);
+      Set<ClassLoader> pkgSet = packagesMap.get(pkgName);
       if (dynamicClassLoaders.size() > 0)
       {
-         Set<RepositoryClassLoader> newSet = ClassLoaderUtils.newPackageSet();
+         Set<ClassLoader> newSet = ClassLoaderUtils.newPackageSet();
          if(pkgSet != null)
             newSet.addAll(pkgSet);
          pkgSet = newSet;
@@ -271,12 +269,12 @@
     * @param name the fully qualified class name
     * @return the cached Class if found, null otherwise
     */
-   public Class loadClassFromCache(String name)
+   public Class<?> loadClassFromCache(String name)
    {
-      Class cls = null;
+      Class<?> cls = null;
       synchronized (classes)
       {
-         cls = (Class) classes.get(name);
+         cls = classes.get(name);
       }
       return cls;
    }
@@ -286,7 +284,7 @@
     * @param cls the Class instance
     * @param cl the repository UCL
     */
-   public void cacheLoadedClass(String name, Class cls, ClassLoader cl)
+   public void cacheLoadedClass(String name, Class<?> cls, ClassLoader cl)
    {
       synchronized (classes)
       {
@@ -300,21 +298,21 @@
 
          // Update the cache for this classloader
          // This is used to cycling classloaders
-         HashSet loadedClasses = (HashSet) loaderToClassesMap.get(cl);
+         HashSet<String> loadedClasses = loaderToClassesMap.get(cl);
          if (loadedClasses == null)
          {
-            loadedClasses = new HashSet();
+            loadedClasses = new HashSet<String>();
             loaderToClassesMap.put(cl, loadedClasses);
          }
          loadedClasses.add(name);
       }
    }
 
-   Class loadClassFromClassLoader(String name, boolean resolve, RepositoryClassLoader cl)
+   Class<?> loadClassFromClassLoader(String name, boolean resolve, RepositoryClassLoader cl)
    {
       try
       {
-         Class cls = cl.loadClassLocally(name, resolve);
+         Class<?> cls = cl.loadClassLocally(name, resolve);
          cacheLoadedClass(name, cls, cl);
          return cls;
       }
@@ -372,22 +370,22 @@
     * @param cl the requesting class loader
     * @param urls a list into which the located resource URLs will be placed
     */
-   public void getResources(String name, ClassLoader cl, List urls)
+   public void getResources(String name, ClassLoader cl, List<URL> urls)
    {
       // Go through all class loaders
-      Iterator iter = classLoaders.iterator();
+      Iterator<ClassLoader> iter = classLoaders.iterator();
       while (iter.hasNext() == true)
       {
-         ClassLoader nextCL = (ClassLoader) iter.next();
+         ClassLoader nextCL = iter.next();
          if (nextCL instanceof RepositoryClassLoader)
          {
             RepositoryClassLoader ucl = (RepositoryClassLoader) nextCL;
             try
             {
-               Enumeration resURLs = ucl.findResourcesLocally(name);
+               Enumeration<URL> resURLs = ucl.findResourcesLocally(name);
                while (resURLs.hasMoreElements())
                {
-                  Object res = resURLs.nextElement();
+                  URL res = resURLs.nextElement();
                   urls.add(res);
                }
             }
@@ -413,8 +411,8 @@
       {
          if (loaderToResourcesMap.containsKey(cl))
          {
-            HashMap resources = (HashMap) loaderToResourcesMap.get(cl);
-            resource = (URL) resources.get(name);
+            HashMap<String, URL> resources = loaderToResourcesMap.get(cl);
+            resource = resources.get(name);
          }
       }
       return resource;
@@ -435,14 +433,14 @@
    /** Check for a resource in the global cache
     * Synchronizes access to globalResources using the loaderToResourcesMap monitor
     * @param name
-    * @return
+    * @return the URL
     */
    protected URL getResourceFromGlobalCache(String name)
    {
-      ResourceInfo ri = null;
+      ResourceInfo<ClassLoader> ri = null;
       synchronized (loaderToResourcesMap)
       {
-         ri = (ResourceInfo) globalResources.get(name);
+         ri = globalResources.get(name);
       }
       URL resource = null;
       if (ri != null)
@@ -454,8 +452,8 @@
    {
       // Get the set of class loaders from the packages map
       String pkgName = getResourcePackageName(name);
-      Iterator i = null;
-      Set pkgSet = (Set) this.packagesMap.get(pkgName);
+      Iterator<ClassLoader> i = null;
+      Set<ClassLoader> pkgSet = this.packagesMap.get(pkgName);
       if (pkgSet != null)
       {
          i = pkgSet.iterator();
@@ -469,7 +467,7 @@
       URL url = null;
       while (i.hasNext() == true)
       {
-         ClassLoader classloader = (ClassLoader) i.next();
+         ClassLoader classloader = i.next();
          if (classloader.equals(cl))
          {
             continue;
@@ -504,10 +502,10 @@
       // This is used for cycling classloaders
       synchronized (loaderToResourcesMap)
       {
-         HashMap resources = (HashMap) loaderToResourcesMap.get(cl);
+         HashMap<String, URL> resources = loaderToResourcesMap.get(cl);
          if (resources == null)
          {
-            resources = new HashMap();
+            resources = new HashMap<String, URL>();
             loaderToResourcesMap.put(cl, resources);
          }
          resources.put(name, url);
@@ -523,7 +521,7 @@
    {
       synchronized (loaderToResourcesMap)
       {
-         globalResources.put(name, new ResourceInfo(url, cl));
+         globalResources.put(name, new ResourceInfo<ClassLoader>(url, cl));
       }
    }
 
@@ -533,11 +531,11 @@
     */
    public URL[] getURLs()
    {
-      HashSet classpath = new HashSet();
-      Set tmp = classLoaders;
-      for (Iterator iter = tmp.iterator(); iter.hasNext();)
+      HashSet<URL> classpath = new HashSet<URL>();
+      Set<ClassLoader> tmp = classLoaders;
+      for (Iterator<ClassLoader> iter = tmp.iterator(); iter.hasNext();)
       {
-         Object obj = iter.next();
+         ClassLoader obj = iter.next();
          if (obj instanceof RepositoryClassLoader)
          {
             RepositoryClassLoader cl = (RepositoryClassLoader) obj;
@@ -568,7 +566,7 @@
       String classRsrcName = className.replace('.', '/') + ".class";
 
       int count = 0;
-      Class loadedClass = this.loadClassFromCache(className);
+      Class<?> loadedClass = this.loadClassFromCache(className);
       StringBuffer results = new StringBuffer(className + " Information\n");
       if (loadedClass != null)
       {
@@ -579,8 +577,8 @@
       {
          results.append("Not loaded in repository cache\n");
       }
-      Set tmp = classLoaders;
-      for (Iterator iter = tmp.iterator(); iter.hasNext();)
+      Set<ClassLoader> tmp = classLoaders;
+      for (Iterator<ClassLoader> iter = tmp.iterator(); iter.hasNext();)
       {
          URLClassLoader cl = (URLClassLoader) iter.next();
          URL classURL = cl.findResource(classRsrcName);
@@ -615,13 +613,13 @@
     * class loader.
     * @param className - the class to load
     */
-   public Class loadClass(String className) throws ClassNotFoundException
+   public Class<?> loadClass(String className) throws ClassNotFoundException
    {
       // Try to load from a UCL in the ULR first
       ClassLoader scl = Thread.currentThread().getContextClassLoader();
       ClassLoader ucl = null;
       if (classLoaders.size() > 0)
-         ucl = (ClassLoader) this.classLoaders.iterator().next();
+         ucl = this.classLoaders.iterator().next();
       try
       {
          if (ucl != null)
@@ -643,7 +641,7 @@
       }
 
       // at last try a native
-      Class clazz = getNativeClassForName(className);
+      Class<?> clazz = getNativeClassForName(className);
       if (clazz != null) return clazz;
 
       throw new ClassNotFoundException(className);
@@ -658,7 +656,7 @@
     * @return the found class
     * @exception ClassNotFoundException when there is no such class
     */
-   public Class loadClassWithout(ClassLoader loader, String className)
+   public Class<?> loadClassWithout(ClassLoader loader, String className)
            throws ClassNotFoundException
    {
       throw new ClassNotFoundException("NYI");
@@ -675,7 +673,7 @@
     * @throws ClassNotFoundException if none of the consulted classloaders were
     *                                able to load the requested class
     */
-   public Class loadClassBefore(ClassLoader stop, String className) throws ClassNotFoundException
+   public Class<?> loadClassBefore(ClassLoader stop, String className) throws ClassNotFoundException
    {
       RepositoryClassLoader stopAt = getRepositoryClassLoader(stop, className);
       return stopAt.loadClassBefore(className);
@@ -857,6 +855,7 @@
    /** Remove the class loader from the repository. This synchronizes on the
     * this.classLoaders
     */
+   @SuppressWarnings("unchecked")
    public void removeClassLoader(ClassLoader loader)
    {
       ArrayList removeNotifications = new ArrayList();
@@ -865,7 +864,7 @@
       {
          if ((loader instanceof RepositoryClassLoader) == false)
          {
-            cl = (ClassLoader) nonUCLClassLoader.remove(loader);
+            cl = nonUCLClassLoader.remove(loader);
          }
          if (cl instanceof RepositoryClassLoader)
          {
@@ -887,7 +886,7 @@
          {
             hasLoadedClasses = loaderToClassesMap.containsKey(cl);
             if (hasLoadedClasses)
-               loadedClasses = (HashSet) loaderToClassesMap.remove(cl);
+               loadedClasses = loaderToClassesMap.remove(cl);
             // This classloader has loaded at least one class
             if (loadedClasses != null)
             {
@@ -914,7 +913,7 @@
          {
             if (loaderToResourcesMap.containsKey(cl))
             {
-               HashMap resources = (HashMap) loaderToResourcesMap.remove(cl);
+               HashMap<String, URL> resources = loaderToResourcesMap.remove(cl);
 
                // Remove the resources from the global cache that are from this classloader
                if (resources != null)
@@ -922,7 +921,7 @@
                   for (Iterator i = resources.keySet().iterator(); i.hasNext();)
                   {
                      String name = (String) i.next();
-                     ResourceInfo ri = (ResourceInfo) globalResources.get(name);
+                     ResourceInfo ri = globalResources.get(name);
                      if (ri != null && ri.cl == cl)
                         globalResources.remove(name);
                   }
@@ -938,10 +937,10 @@
             {
                for(String pkgName : pkgNames)
                {
-                  Set pkgSet = (Set) packagesMap.get(pkgName);
+                  Set<ClassLoader> pkgSet = packagesMap.get(pkgName);
                   if (pkgSet != null)
                   {
-                     Set<RepositoryClassLoader> newSet = ClassLoaderUtils.newPackageSet();
+                     Set<ClassLoader> newSet = ClassLoaderUtils.newPackageSet();
                      newSet.addAll(pkgSet);
                      pkgSet = newSet;
 
@@ -957,15 +956,15 @@
          {
             // A dynamic classloader could end up in any package set
             loaderToPackagesMap.remove(cl);
-            for (Iterator i = packagesMap.entrySet().iterator(); i.hasNext();)
+            for (Iterator<Map.Entry<String, Set<ClassLoader>>> i = packagesMap.entrySet().iterator(); i.hasNext();)
             {
-               Map.Entry entry = (Map.Entry) i.next();
-               Set pkgSet = (Set) entry.getValue();
+               Map.Entry<String, Set<ClassLoader>> entry = i.next();
+               Set<ClassLoader> pkgSet = entry.getValue();
                if(pkgSet.contains(cl))
                {
                   if(pkgSet.size() > 1)
                   {
-                     Set<RepositoryClassLoader> newSet = ClassLoaderUtils.newPackageSet();
+                     Set<ClassLoader> newSet = ClassLoaderUtils.newPackageSet();
                      newSet.addAll(pkgSet);
                      newSet.remove(cl);
                      packagesMap.put(entry.getKey(), newSet);
@@ -1015,7 +1014,7 @@
       {
          Notification msg = new Notification(CLASSLOADER_ADDED, this, getNextSequenceNumber());
          if (NOTIFICATION_MODE == WEAK_REFERENCE_MODE)
-            msg.setUserData(new WeakReference(ucl));
+            msg.setUserData(new WeakReference<ClassLoader>(ucl));
          else
             msg.setUserData(ucl);
          broadcaster.sendNotification(msg);
@@ -1150,7 +1149,7 @@
          if( pkgName.startsWith("META-INF") || pkgName.startsWith("WEB-INF") )
             return;
 
-         Set<RepositoryClassLoader> pkgSet = (Set<RepositoryClassLoader>) packagesMap.get(pkgName);
+         Set<ClassLoader> pkgSet = packagesMap.get(pkgName);
          if( pkgSet == null )
          {
             pkgSet = ClassLoaderUtils.newPackageSet();
@@ -1159,17 +1158,17 @@
          if( pkgSet.contains(loader) == false )
          {
             // Make a copy of the pkgSet to avoid concurrent mods
-            Set<RepositoryClassLoader> newSet = ClassLoaderUtils.newPackageSet();
+            Set<ClassLoader> newSet = ClassLoaderUtils.newPackageSet();
             newSet.addAll(pkgSet);
             pkgSet = newSet;
             // Add the class loader
-            pkgSet.add((RepositoryClassLoader)loader);
+            pkgSet.add(loader);
             packagesMap.put(pkgName, newSet);
             List<String> loaderPkgNames = loaderToPackagesMap.get(loader);
             if( loaderPkgNames == null )
             {
                loaderPkgNames = new ArrayList<String>();
-               loaderToPackagesMap.put((RepositoryClassLoader)loader, loaderPkgNames);
+               loaderToPackagesMap.put(loader, loaderPkgNames);
             }
             loaderPkgNames.add(pkgName);
 
diff -EbwBru 6.0.0.M1/org/jboss/mx/loading/UnifiedLoaderRepository3MBean.java trunk/org/jboss/mx/loading/UnifiedLoaderRepository3MBean.java
--- 6.0.0.M1/org/jboss/mx/loading/UnifiedLoaderRepository3MBean.java	2009-11-30 14:38:49.000000000 -0600
+++ trunk/org/jboss/mx/loading/UnifiedLoaderRepository3MBean.java	2009-12-10 12:42:46.000000000 -0600
@@ -26,18 +26,21 @@
 /** The UnifiedLoaderRepository3 (ULR) management interface
  *
  * @author Scott.Stark@jboss.org
- * @version $Revision: 81022 $
+ * @version $Revision: 85671 $
  */
 public interface UnifiedLoaderRepository3MBean extends UnifiedLoaderRepositoryMBean
 {
    /** Called by LoadMgr to obtain all class loaders for the given className
+    * @param className 
     *@return LinkedList<UnifiedClassLoader3>, may be null
     */
-   public Set getPackageClassLoaders(String className);
+   public Set<ClassLoader> getPackageClassLoaders(String className);
 
    /** A utility method that iterates over all repository class loader and
     * display the class information for every UCL that contains the given
     * className
+    * @param className 
+    * @return the class info
     */
    public String displayClassInfo(String className);
 
diff -EbwBru 6.0.0.M1/org/jboss/mx/metadata/AbstractBuilder.java trunk/org/jboss/mx/metadata/AbstractBuilder.java
--- 6.0.0.M1/org/jboss/mx/metadata/AbstractBuilder.java	2009-11-30 14:39:18.000000000 -0600
+++ trunk/org/jboss/mx/metadata/AbstractBuilder.java	2009-12-10 12:42:23.000000000 -0600
@@ -35,7 +35,7 @@
  * @see org.jboss.mx.metadata.MetaDataBuilder
  *
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  *
  */
 public abstract class AbstractBuilder
@@ -47,7 +47,7 @@
    /**
     * Configuration properties.
     */
-   protected Map properties = new HashMap();
+   protected Map<String, Object> properties = new HashMap<String, Object>();
 
    // Constructors --------------------------------------------------
 
@@ -56,7 +56,7 @@
     */
    public AbstractBuilder() {}
 
-   public AbstractBuilder(Map properties)
+   public AbstractBuilder(Map<String, Object> properties)
    {
       this.properties = properties;
    }
@@ -105,6 +105,9 @@
 
    /**
     * Returns a string property or <tt>null</tt> if key does not exist.
+    * 
+    * @param key the key
+    * @return the property
     */
    public String getStringProperty(String key)
    {
@@ -139,15 +142,17 @@
     *
     * @param   properties  configuration properties
     */
-   protected void setProperties(Map properties)
+   protected void setProperties(Map<String, Object> properties)
    {
-      this.properties = new HashMap(properties);
+      this.properties = new HashMap<String, Object>(properties);
    }
 
    /**
     * Returns the property map of this builder instance.
+    * 
+    * @return the properties
     */
-   protected Map getProperties()
+   protected Map<String, Object> getProperties()
    {
       return properties;
    }
diff -EbwBru 6.0.0.M1/org/jboss/mx/metadata/AttributeOperationResolver.java trunk/org/jboss/mx/metadata/AttributeOperationResolver.java
--- 6.0.0.M1/org/jboss/mx/metadata/AttributeOperationResolver.java	2009-11-30 14:39:18.000000000 -0600
+++ trunk/org/jboss/mx/metadata/AttributeOperationResolver.java	2009-12-10 12:42:23.000000000 -0600
@@ -52,6 +52,8 @@
     * Uses the AttributeInfo and OperationInfo arrays in the MBeanInfo to configure the
     * resolver.  Each attribute and operation will be assigned a code which corresponds
     * to it's position in the info array.
+    * 
+    * @param info the mbean info
     */
    public AttributeOperationResolver(MBeanInfo info)
    {
@@ -61,7 +63,10 @@
    /**
     * Uses the AttributeInfo and OperationInfo arrays to configure the resolver.
     * Each attribute and operation will be assigned a code which corresponds to it's
-    * position in the info array.
+    * position in the info array
+    * 
+    * @param attributes the attributes
+    * @param operations the operations
     */
    public AttributeOperationResolver(MBeanAttributeInfo[] attributes, MBeanOperationInfo[] operations)
    {
diff -EbwBru 6.0.0.M1/org/jboss/mx/metadata/JBossXMBean10.java trunk/org/jboss/mx/metadata/JBossXMBean10.java
--- 6.0.0.M1/org/jboss/mx/metadata/JBossXMBean10.java	2009-11-30 14:39:18.000000000 -0600
+++ trunk/org/jboss/mx/metadata/JBossXMBean10.java	2009-12-10 12:42:23.000000000 -0600
@@ -59,8 +59,9 @@
  * @author Matt Munz
  * @author Scott.Stark@jboss.org
  * @author Dimitris.Andreadis@jboss.org
- * @version $Revision: 81026 $
+ * @version $Revision: 86129 $
  */
+@SuppressWarnings("unchecked")
 public class JBossXMBean10 extends AbstractBuilder
    implements XMBeanConstants
 {
@@ -424,12 +425,14 @@
          boolean isReadable = true;
          boolean isWritable = true;
 
+         if (access != null)
+         {
          if (access.equalsIgnoreCase("read-only"))
             isWritable = false;
 
          else if (access.equalsIgnoreCase("write-only"))
             isReadable = false;
-
+         }
 
          ModelMBeanAttributeInfo info = new ModelMBeanAttributeInfo(
             name, type, description, isReadable, isWritable, false, descr
@@ -447,6 +450,12 @@
    /**
     * Get the value for the attribute descriptor "value" or "default"
     * the same way we would do for mbean attribute overrides
+    * 
+    * @param attribute the attribute
+    * @param typeName the type name
+    * @param which ?
+    * @return the value
+    * @throws NotCompliantMBeanException for any error
     */
    protected Object getAttributeValue(Element attribute, String typeName, String which)
       throws NotCompliantMBeanException
diff -EbwBru 6.0.0.M1/org/jboss/mx/metadata/MBeanCapability.java trunk/org/jboss/mx/metadata/MBeanCapability.java
--- 6.0.0.M1/org/jboss/mx/metadata/MBeanCapability.java	2009-11-30 14:39:18.000000000 -0600
+++ trunk/org/jboss/mx/metadata/MBeanCapability.java	2009-12-10 12:42:23.000000000 -0600
@@ -22,6 +22,7 @@
 package org.jboss.mx.metadata;
 
 import javax.management.DynamicMBean;
+import javax.management.MBean;
 import javax.management.NotCompliantMBeanException;
 
 /**
@@ -59,22 +60,11 @@
    public static final int STANDARD_MBEAN = 0x123;
    public static final int NOT_AN_MBEAN = 0xc0de;
 
-   private static final MBeanCapability DYNAMIC_CONST = new MBeanCapability(DYNAMIC_MBEAN);
-   private static final MBeanCapability STANDARD_CONST = new MBeanCapability(STANDARD_MBEAN);
-
-   protected int mbeanType = NOT_AN_MBEAN;
-
-   private MBeanCapability(int type)
-   {
-      mbeanType = type;
-   }
-
-   public int getMBeanType()
+   private MBeanCapability()
    {
-      return mbeanType;
    }
 
-   public static MBeanCapability of(Class mbeanClass) throws NotCompliantMBeanException
+   public static int of(Class<?> mbeanClass) throws NotCompliantMBeanException
    {
       if (null == mbeanClass)
       {
@@ -84,22 +74,27 @@
       // If MyClass is an instance of the DynamicMBean interface, MyClass is a dynamic MBean.
       if (DynamicMBean.class.isAssignableFrom(mbeanClass))
       {
-         return DYNAMIC_CONST;
+         return DYNAMIC_MBEAN;
+      }
+
+      // Class is annotated with @MBean 
+      if (mbeanClass.isAnnotationPresent(MBean.class))
+      {
+         return STANDARD_MBEAN;
       }
 
       // If the MyClass MBean is an instance of a MyClassMBean interface, MyClass is a standard MBean
-      Class [] interfaces = mbeanClass.getInterfaces();
-      for (int i = 0; i < interfaces.length; i++)
+      Class<?> [] interfaces = mbeanClass.getInterfaces();
+      for (Class<?> anInterface : interfaces)
       {
-         Class anInterface = interfaces[i];
          if (anInterface.getName().equals(mbeanClass.getName() + "MBean"))
          {
-            return STANDARD_CONST;
+            return STANDARD_MBEAN;
          }
       }
 
       // If there is an ancestor called SuperClass that is an instance of SuperClassMBean
-      Class superClass = mbeanClass.getSuperclass();
+      Class<?> superClass = mbeanClass.getSuperclass();
       if (superClass != null)
          return of(superClass);
 
diff -EbwBru 6.0.0.M1/org/jboss/mx/metadata/MBeanInfoConversion.java trunk/org/jboss/mx/metadata/MBeanInfoConversion.java
--- 6.0.0.M1/org/jboss/mx/metadata/MBeanInfoConversion.java	2009-11-30 14:39:18.000000000 -0600
+++ trunk/org/jboss/mx/metadata/MBeanInfoConversion.java	2009-12-10 12:42:23.000000000 -0600
@@ -48,7 +48,7 @@
  * ModelMBeanOperationInfos that are referred to in ModelMBeanAttributeInfos.
  *
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  */
 public class MBeanInfoConversion
    implements ModelMBeanConstants
@@ -57,6 +57,7 @@
     * Convert regular MBeanInfo into ModelMBeanInfo.
     *
     * @param   info  MBeanInfo to convert (such as the Standard MBean info)
+    * @return the model mbean info
     */
    public static ModelMBeanInfoSupport toModelMBeanInfo(MBeanInfo info)
    {
@@ -74,7 +75,9 @@
     *          attribute descriptors are mapped to appropriate management 
     *          operations with the <tt>getMethod</tt> and <tt>setMethod</tt>
     *          descriptor fields.
+    * @return the modelmbean info
     */
+   @SuppressWarnings("unchecked")
    public static ModelMBeanInfoSupport toModelMBeanInfo(MBeanInfo info, boolean createAttributeOperationMapping)
    {
       if (info instanceof ModelMBeanInfoSupport)
@@ -246,8 +249,14 @@
     * fields are stripped out.  If the stripAllRoles parameter is true
     * then all the referred-to operations will be stripped.  Otherwise only 
     * referred-to operations with a role of "getter" or "setter" will be stripped.
+    * 
+    * @param info the original info
+    * @param stripAllRoles see text
+    * @return the modelmbean info
+    * @throws MBeanException why?
     */
     // why mbeanexception?
+   @SuppressWarnings("unchecked")
    public static ModelMBeanInfoSupport stripAttributeOperations(ModelMBeanInfo info, boolean stripAllRoles) throws MBeanException
    {
       HashMap opsMap = new HashMap();
diff -EbwBru 6.0.0.M1/org/jboss/mx/metadata/MethodMapper.java trunk/org/jboss/mx/metadata/MethodMapper.java
--- 6.0.0.M1/org/jboss/mx/metadata/MethodMapper.java	2009-11-30 14:39:18.000000000 -0600
+++ trunk/org/jboss/mx/metadata/MethodMapper.java	2009-12-10 12:42:23.000000000 -0600
@@ -39,13 +39,15 @@
  *
  * @author  <a href="mailto:trevor@protocool.com">Trevor Squires</a>.
  */
-
+@SuppressWarnings("unchecked")
 public class MethodMapper
 {
    private HashMap map = null;
 
    /**
     * Constructs a mapper by reflecting on the class.
+    * 
+    * @param resourceClass the resource class
     */
    public MethodMapper(Class resourceClass)
    {
@@ -59,6 +61,9 @@
 
    /**
     * Return a method matching the signature defined in the operation info
+    * 
+    * @param info the operation info
+    * @return the method
     */
    public Method lookupOperation(MBeanOperationInfo info)
    {
@@ -72,6 +77,9 @@
 
    /**
     * Return a method matching the getter signature expected for an attribute.
+    * 
+    * @param info the attribute info
+    * @return the method
     */
    public Method lookupGetter(MBeanAttributeInfo info)
    {
@@ -85,6 +93,9 @@
 
    /**
     * Return a method matching the getter signature expected for a ModelMBean attribute.
+    * 
+    * @param info the attribute info
+    * @return the method
     */
    public Method lookupGetter(ModelMBeanAttributeInfo info)
    {
@@ -98,6 +109,9 @@
 
    /**
     * Return a method matching the setter signature expected for an attribute
+    * 
+    * @param info the attribute info
+    * @return the method
     */
    public Method lookupSetter(MBeanAttributeInfo info)
    {
@@ -111,6 +125,9 @@
 
    /**
     * Return a method matching the setter signature expected for a ModelMBean attribute
+    * 
+    * @param info the attribute info
+    * @return the method
     */
    public Method lookupSetter(ModelMBeanAttributeInfo info)
    {
@@ -124,6 +141,11 @@
 
    /**
     * Return a method matching the specified signature
+    * 
+    * @param returnType the return type
+    * @param name the name
+    * @param signature the signature
+    * @return the method
     */
    public Method lookupMethod(String returnType, String name, String[] signature)
    {
@@ -142,6 +164,9 @@
 
    /**
     * Generates a signature string for an attribute getter method using standard rules
+    * 
+    * @param info the attribute info
+    * @return the signature
     */
    public static String getterSignature(MBeanAttributeInfo info)
    {
@@ -157,6 +182,9 @@
    /**
     * Generates a getter signature string for a ModelMBean attribute by checking the
     * descriptor for getMethod.
+    * 
+    * @param info the attribute info
+    * @return the signature
     */
    public static String getterSignature(ModelMBeanAttributeInfo info)
    {
@@ -177,6 +205,9 @@
 
    /**
     * Generates a signature string for an attribute setter method using standard rules
+    * 
+    * @param info the attribute info
+    * @return the signature
     */
    public static String setterSignature(MBeanAttributeInfo info)
    {
@@ -191,6 +222,9 @@
    /**
     * Generates a setter signature string for a ModelMBean attribute by checking the
     * descriptor for setMethod.
+    * 
+    * @param info the attribute info
+    * @return the signature
     */
    public static String setterSignature(ModelMBeanAttributeInfo info)
    {
@@ -211,6 +245,9 @@
 
    /**
     * Generates a signature string using the operation info.
+    * 
+    * @param info the operation info
+    * @return the signature
     */
    public static String operationSignature(MBeanOperationInfo info)
    {
@@ -230,6 +267,9 @@
 
    /**
     * Generates a signature string using a Method object.
+    * 
+    * @param method the method
+    * @return the signature
     */
    public static String methodSignature(Method method)
    {
@@ -249,6 +289,11 @@
 
    /**
     * Generates a signature string using the supplied signature arguments.
+    * 
+    * @param returnType the return type
+    * @param name the name
+    * @param signature the signature
+    * @return the signature
     */
    public static String methodSignature(String returnType, String name, String[] signature)
    {
@@ -277,7 +322,11 @@
 
    /**
     * creates the signature string to Method HashMap.
+    * 
+    * @param resourceClass the resource class
+    * @return the map
     */
+   @SuppressWarnings("unchecked")
    protected HashMap createMap(Class resourceClass)
    {
       HashMap cmap = new HashMap();
diff -EbwBru 6.0.0.M1/org/jboss/mx/metadata/StandardMetaData.java trunk/org/jboss/mx/metadata/StandardMetaData.java
--- 6.0.0.M1/org/jboss/mx/metadata/StandardMetaData.java	2009-11-30 14:39:18.000000000 -0600
+++ trunk/org/jboss/mx/metadata/StandardMetaData.java	2009-12-10 12:42:23.000000000 -0600
@@ -21,6 +21,7 @@
  */
 package org.jboss.mx.metadata;
 
+import java.lang.annotation.Annotation;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
@@ -28,14 +29,21 @@
 import java.util.Iterator;
 import java.util.List;
 
+import javax.management.Description;
 import javax.management.IntrospectionException;
+import javax.management.MBean;
 import javax.management.MBeanAttributeInfo;
 import javax.management.MBeanConstructorInfo;
 import javax.management.MBeanInfo;
 import javax.management.MBeanNotificationInfo;
 import javax.management.MBeanOperationInfo;
+import javax.management.MBeanParameterInfo;
+import javax.management.ManagedAttribute;
+import javax.management.ManagedOperation;
 import javax.management.NotCompliantMBeanException;
 import javax.management.NotificationBroadcaster;
+import javax.management.NotificationInfo;
+import javax.management.NotificationInfos;
 
 /**
  * This metadata builder implementation builds a MBean info based on the
@@ -43,7 +51,7 @@
  * to generate the metadata for Standard MBeans.  <p>
  *
  * In cooperation with the 
- * {@link MBeanInfoConversion#toModelMBeanInfo MBeanInfoConversion} class you
+ * {@link MBeanInfoConversion#toModelMBeanInfo(MBeanInfo) MBeanInfoConversion} class you
  * can use this builder as a migration tool from Standard to Model MBeans, or
  * for cases where you want the management interface be based on a compile-time
  * type safe interface. It is also possible to subclass this builder
@@ -69,12 +77,12 @@
    /**
     * The class of the MBean instance. 
     */
-   private Class mbeanClass    = null;
+   private Class<?> mbeanClass    = null;
    
    /**
     * The interface used as a basis for constructing the MBean metadata.
     */
-   private Class mbeanInterface    = null;
+   private Class<?> mbeanInterface    = null;
 
 
    // Static --------------------------------------------------------
@@ -87,10 +95,10 @@
     *
     * @return  the Standard MBean interface class or <tt>null</tt> if not found
     */
-   public static Class findStandardInterface(Class mbeanClass)
+   public static Class<?> findStandardInterface(Class<?> mbeanClass)
    {
-      Class concrete = mbeanClass;
-      Class stdInterface = null;
+      Class<?> concrete = mbeanClass;
+      Class<?> stdInterface = null;
       while (null != concrete)
       {
          stdInterface = findStandardInterface(concrete, concrete.getInterfaces());
@@ -103,10 +111,10 @@
       return null;
    }
 
-   private static Class findStandardInterface(Class concrete, Class[] interfaces)
+   private static Class<?> findStandardInterface(Class<?> concrete, Class<?>[] interfaces)
    {
       String stdName = concrete.getName() + "MBean";
-      Class retval = null;
+      Class<?> retval = null;
 
       // look to see if this class implements MBean std interface
       for (int i = 0; i < interfaces.length; ++i)
@@ -129,6 +137,7 @@
     * on the class of the given resource instance.
     * 
     * @param   mbeanInstance  MBean instance
+    * @throws NotCompliantMBeanException for any error
     */
    public StandardMetaData(Object mbeanInstance) throws NotCompliantMBeanException
    {
@@ -142,12 +151,13 @@
     *
     * @param   mbeanClass  resource class that implements an interface
     *                      adhering to the Standard MBean naming conventions
+    * @throws NotCompliantMBeanException for any error
     */
-   public StandardMetaData(Class mbeanClass)  throws NotCompliantMBeanException
+   public StandardMetaData(Class<?> mbeanClass)  throws NotCompliantMBeanException
    {
       this.mbeanClass     = mbeanClass;
       this.mbeanInterface = StandardMetaData.findStandardInterface(mbeanClass);
-      if (this.mbeanInterface == null)
+      if (this.mbeanInterface == null && mbeanClass.isAnnotationPresent(MBean.class) == false)
          throw new NotCompliantMBeanException("Cannot obtain management interface for: " + mbeanClass);
    }
 
@@ -157,8 +167,9 @@
     * 
     * @param   mbInstance  MBean instance
     * @param   mbInterface the management interface
+    * @throws NotCompliantMBeanException for any error
     */
-   public StandardMetaData(Object mbInstance, Class mbInterface) throws NotCompliantMBeanException
+   public StandardMetaData(Object mbInstance, Class<?> mbInterface) throws NotCompliantMBeanException
    {
       this.mbeanInstance = mbInstance;
       this.mbeanClass = mbInstance.getClass();
@@ -176,16 +187,23 @@
 
    /**
     * Retrieve the management interface
+    * 
+    * @return the interface
     */
-   public Class getMBeanInterface()
+   public Class<?> getMBeanInterface()
    {
       return mbeanInterface;
    }
    
    // MetaDataBuilder implementation --------------------------------
 
+   @SuppressWarnings("unchecked")
    public MBeanInfo build() throws NotCompliantMBeanException
    {
+      // We have an annotated class
+      if (mbeanClass.isAnnotationPresent(MBean.class))
+         return buildFromAnnotations();
+
       try
       {
          // First check the mbean instance implements the interface
@@ -196,12 +214,10 @@
                                                  mbeanInterface.getName());
 
          // First build the constructors
-         Constructor[] constructors = mbeanClass.getConstructors();
+         Constructor<?>[] constructors = mbeanClass.getConstructors();
          MBeanConstructorInfo[] constructorInfo = new MBeanConstructorInfo[constructors.length];
          for (int i = 0; i < constructors.length; ++i)
-         {
             constructorInfo[i] = new MBeanConstructorInfo("MBean Constructor.", constructors[i]);
-         }
 
          // Next we have to figure out how the methods in the mbean class map
          // to attributes and operations
@@ -304,19 +320,206 @@
       }
    }
 
+   public MBeanInfo buildFromAnnotations() throws NotCompliantMBeanException
+   {
+      try
+      {
+         // First build the constructors
+         Constructor<?>[] constructors = mbeanClass.getConstructors();
+         MBeanConstructorInfo[] constructorInfo = new MBeanConstructorInfo[constructors.length];
+         for (int i = 0; i < constructors.length; ++i)
+         {
+            String desc = "MBean Constructor.";
+            Description description = constructors[i].getAnnotation(Description.class);
+            if (description != null)
+               desc = description.value();
+            MBeanParameterInfo[] signature = getSignature(constructors[i]);
+            constructorInfo[i] = new MBeanConstructorInfo(desc, desc, signature);
+         }
+
+         // Next we have to figure out how the methods in the mbean class map
+         // to attributes and operations
+         Method[] methods = mbeanClass.getMethods();
+         HashMap<String, Method> getters = new HashMap<String, Method>();
+         HashMap<String, Method> setters = new HashMap<String, Method>();
+
+         HashMap<String, MBeanOperationInfo> operInfo = new HashMap<String, MBeanOperationInfo>();
+         List<MBeanAttributeInfo> attrInfo = new ArrayList<MBeanAttributeInfo>();
+
+         for (int i = 0; i < methods.length; ++i)
+         {
+            if (methods[i].isAnnotationPresent(ManagedAttribute.class))
+            {
+               String methodName = methods[i].getName();
+               Class<?>[] signature = methods[i].getParameterTypes();
+               Class<?> returnType  = methods[i].getReturnType();
+
+               if (methodName.startsWith("set") && methodName.length() > 3 
+                       && signature.length == 1 && returnType == Void.TYPE)
+               {
+                  String key = methodName.substring(3, methodName.length());
+                  Method setter = setters.get(key);
+                  if (setter != null && setter.getParameterTypes()[0].equals(signature[0]) == false)
+                     throw new IntrospectionException("overloaded type for attribute set: " + key);
+                  setters.put(key, methods[i]);
+               }
+               else if (methodName.startsWith("get") && methodName.length() > 3 
+                            && signature.length == 0 && returnType != Void.TYPE)
+               {
+                  String key = methodName.substring(3, methodName.length());
+                  Method getter = getters.get(key);
+                  if (getter != null && getter.getName().startsWith("is"))
+                     throw new IntrospectionException("mixed use of get/is for attribute " + key);
+                  getters.put(key, methods[i]);
+               }
+               else if (methodName.startsWith("is") && methodName.length() > 2 
+                           && signature.length == 0 && isBooleanReturn(returnType))
+               {
+                  String key = methodName.substring(2, methodName.length());
+                  Method getter = getters.get(key);
+                  if (getter != null && getter.getName().startsWith("get"))
+                  {
+                     throw new IntrospectionException("mixed use of get/is for attribute " + key);
+                  }
+                  getters.put(key, methods[i]);
+               }
+            }
+            ManagedOperation operation = methods[i].getAnnotation(ManagedOperation.class);
+            if (operation != null)
+            {
+               String desc = "MBean Operation.";
+               Description description = methods[i].getAnnotation(Description.class);
+               if (description != null)
+                  desc = description.value();
+               int impact = operation.impact().getCode();
+               MBeanParameterInfo[] sign = getSignature(methods[i]);
+               MBeanOperationInfo info = new MBeanOperationInfo(methods[i].getName(), desc, sign, methods[i].getReturnType().getName(), impact);
+               operInfo.put(getSignatureString(methods[i]), info);
+            }
+         }
+
+         String[] keys = getters.keySet().toArray(new String[0]);
+         for (int i = 0; i < keys.length; ++i)
+         {
+            String attrName = keys[i];
+            Method getter = getters.remove(attrName);
+            Method setter = setters.remove(attrName);
+            
+            String desc = "MBean Attribute.";
+            Description description = getter.getAnnotation(Description.class);
+            if (description != null)
+               desc = description.value();
+            else if (setter != null)
+            {
+               description = setter.getAnnotation(Description.class);
+               if (description != null)
+                  desc = description.value();
+            }
+            MBeanAttributeInfo info = new MBeanAttributeInfo(attrName, desc, getter, setter);
+            attrInfo.add(info);
+         }
+
+         for (String attrName : setters.keySet())
+         {
+            Method setter = setters.get(attrName);
+            String desc = "MBean Attribute.";
+            Description description = setter.getAnnotation(Description.class);
+            if (description != null)
+               desc = description.value();
+            MBeanAttributeInfo info = new MBeanAttributeInfo(attrName, desc, null, setter);
+            attrInfo.add(info);
+         }
+
+         // save away the attribute and operation info objects
+         MBeanAttributeInfo[] attributeInfo = attrInfo.toArray(new MBeanAttributeInfo[0]);
+         MBeanOperationInfo[] operationInfo = operInfo.values().toArray(new MBeanOperationInfo[0]);
+
+         // TODO
+         NotificationInfo[] notifs = null;
+         NotificationInfos notifInfos = mbeanClass.getAnnotation(NotificationInfos.class);
+         if (notifInfos != null)
+            notifs = notifInfos.value();
+         else
+         {
+            NotificationInfo notifInfo = mbeanClass.getAnnotation(NotificationInfo.class);
+            if (notifInfo != null)
+               notifs = new NotificationInfo[] { notifInfo };
+         }
+
+         MBeanNotificationInfo[] notifications = null;
+         if (notifs == null)
+         {
+            notifications = new MBeanNotificationInfo[0];
+         }
+         else
+         {
+            notifications = new MBeanNotificationInfo[notifs.length];
+            for (int i = 0; i < notifs.length; ++i)
+            {
+               String desc = "MBean Notification.";
+               String description = notifs[i].description().value();
+               if (description.length() > 0)
+                  desc = description;
+               notifications[i] = new MBeanNotificationInfo(notifs[i].types(), notifs[i].notificationClass().getName(), desc);
+            }
+         }
+         
+         String desc = "Management Bean.";
+         Description description = mbeanClass.getAnnotation(Description.class);
+         if (description != null)
+            desc = description.value();
+         return new MBeanInfo(mbeanClass.getName(), desc,
+               attributeInfo, constructorInfo, operationInfo, notifications);
+      }
+      catch (IntrospectionException e)
+      {
+         throw new NotCompliantMBeanException(e.getMessage());
+      }
+   }
+
    /**
     * JMX standard specifies that only "boolean isX()" style methods
     * represent attributes. "Boolean isX()" methods map to operations.
     */
-   private boolean isBooleanReturn(Class returnType)
+   private boolean isBooleanReturn(Class<?> returnType)
    {
       return returnType == Boolean.TYPE;
    }
 
+   protected MBeanParameterInfo[] getSignature(Constructor<?> constructor)
+   {
+      return getSignature(constructor.getParameterTypes(), constructor.getParameterAnnotations());
+   }
+
+   protected MBeanParameterInfo[] getSignature(Method method)
+   {
+      return getSignature(method.getParameterTypes(), method.getParameterAnnotations());
+   }
+
+   protected MBeanParameterInfo[] getSignature(Class<?>[] parameterTypes, Annotation[][] annotations)
+   {
+      MBeanParameterInfo[] result = new MBeanParameterInfo[parameterTypes.length];
+      for (int i = 0; i < result.length; ++i)
+      {
+         String name = "p" + i;
+         String desc = name;
+         for (Annotation annotation : annotations[i])
+         {
+            if (annotation.annotationType() == Description.class)
+            {
+               Description description = (Description) annotation;
+               desc = description.value();
+            }
+         }
+         result[i] = new MBeanParameterInfo(name, parameterTypes[i].getName(), desc);
+      }
+      return result;
+   }
+   
    protected String getSignatureString(Method method)
    {
       String name = method.getName();
-      Class[] signature = method.getParameterTypes();
+      Class<?>[] signature = method.getParameterTypes();
       StringBuffer buffer = new StringBuffer(512);
       buffer.append(name);
       buffer.append("(");
diff -EbwBru 6.0.0.M1/org/jboss/mx/metadata/xb/DescriptorSupportContainer.java trunk/org/jboss/mx/metadata/xb/DescriptorSupportContainer.java
--- 6.0.0.M1/org/jboss/mx/metadata/xb/DescriptorSupportContainer.java	2009-11-30 14:39:18.000000000 -0600
+++ trunk/org/jboss/mx/metadata/xb/DescriptorSupportContainer.java	2009-12-10 12:42:23.000000000 -0600
@@ -31,7 +31,7 @@
 
 /**
  @author Scott.Stark@jboss.org
- @version $Revision: 81026 $
+ @version $Revision: 85671 $
  */
 public class DescriptorSupportContainer
    implements GenericValueContainer
@@ -119,7 +119,7 @@
       }
    }
 
-   public Class getTargetClass()
+   public Class<?> getTargetClass()
    {
       return DescriptorSupport.class;
    }
diff -EbwBru 6.0.0.M1/org/jboss/mx/metadata/xb/InterceptorHolder.java trunk/org/jboss/mx/metadata/xb/InterceptorHolder.java
--- 6.0.0.M1/org/jboss/mx/metadata/xb/InterceptorHolder.java	2009-11-30 14:39:18.000000000 -0600
+++ trunk/org/jboss/mx/metadata/xb/InterceptorHolder.java	2009-12-10 12:42:23.000000000 -0600
@@ -31,12 +31,12 @@
  A container for the interceptor elements.
  
  @author Scott.Stark@jboss.org
- @version $Revision: 81026 $
+ @version $Revision: 85671 $
  */
 public class InterceptorHolder
    implements GenericValueContainer
 {
-   private Class clazz;
+   private Class<?> clazz;
 
    public void addChild(QName name, Object value)
    {
@@ -71,7 +71,7 @@
       return i;
    }
 
-   public Class getTargetClass()
+   public Class<?> getTargetClass()
    {
       return Interceptor.class;
    }
diff -EbwBru 6.0.0.M1/org/jboss/mx/metadata/xb/InterceptorsHolder.java trunk/org/jboss/mx/metadata/xb/InterceptorsHolder.java
--- 6.0.0.M1/org/jboss/mx/metadata/xb/InterceptorsHolder.java	2009-11-30 14:39:18.000000000 -0600
+++ trunk/org/jboss/mx/metadata/xb/InterceptorsHolder.java	2009-12-10 12:42:23.000000000 -0600
@@ -22,16 +22,15 @@
 package org.jboss.mx.metadata.xb;
 
 import java.util.ArrayList;
-import java.util.List;
 
 import org.jboss.mx.interceptor.Interceptor;
 
 /**
  @author Scott.Stark@jboss.org
- @version $Revision: 81026 $ */
+ @version $Revision: 85671 $ */
 public class InterceptorsHolder
 {
-   private ArrayList interceptors = new ArrayList();
+   private ArrayList<Interceptor> interceptors = new ArrayList<Interceptor>();
 
    public void addInterceptor(Interceptor i)
    {
diff -EbwBru 6.0.0.M1/org/jboss/mx/metadata/xb/ModelMBeanAttributeInfoContainer.java trunk/org/jboss/mx/metadata/xb/ModelMBeanAttributeInfoContainer.java
--- 6.0.0.M1/org/jboss/mx/metadata/xb/ModelMBeanAttributeInfoContainer.java	2009-11-30 14:39:18.000000000 -0600
+++ trunk/org/jboss/mx/metadata/xb/ModelMBeanAttributeInfoContainer.java	2009-12-10 12:42:23.000000000 -0600
@@ -35,7 +35,7 @@
 /**
  * The ModelMBeanAttributeInfo JBossXB container 
  * @author Scott.Stark@jboss.org
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  */
 public class ModelMBeanAttributeInfoContainer
    implements GenericValueContainer
@@ -170,7 +170,7 @@
          this.description = (String) value;
       }
    }
-   public Class getTargetClass()
+   public Class<?> getTargetClass()
    {
       return ModelMBeanAttributeInfo.class;
    }
diff -EbwBru 6.0.0.M1/org/jboss/mx/metadata/xb/ModelMBeanConstructorInfoContainer.java trunk/org/jboss/mx/metadata/xb/ModelMBeanConstructorInfoContainer.java
--- 6.0.0.M1/org/jboss/mx/metadata/xb/ModelMBeanConstructorInfoContainer.java	2009-11-30 14:39:18.000000000 -0600
+++ trunk/org/jboss/mx/metadata/xb/ModelMBeanConstructorInfoContainer.java	2009-12-10 12:42:23.000000000 -0600
@@ -34,7 +34,7 @@
 /**
  * The ModelMBeanConstructorInfo JBossXB container 
  * @author Scott.Stark@jboss.org
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  */
 public class ModelMBeanConstructorInfoContainer
    implements GenericValueContainer
@@ -42,7 +42,7 @@
    private static final Logger log = Logger.getLogger(ModelMBeanConstructorInfoContainer.class);
    private String name;
    private String description;
-   private ArrayList params = new ArrayList();
+   private ArrayList<MBeanParameterInfo> params = new ArrayList<MBeanParameterInfo>();
    private Descriptor descriptor;
 
    public Descriptor getDescriptors()
@@ -86,7 +86,7 @@
          this.description = (String) value;
       }
    }
-   public Class getTargetClass()
+   public Class<?> getTargetClass()
    {
       return ModelMBeanConstructorInfo.class;
    }
diff -EbwBru 6.0.0.M1/org/jboss/mx/metadata/xb/ModelMBeanInfoSupportWrapper.java trunk/org/jboss/mx/metadata/xb/ModelMBeanInfoSupportWrapper.java
--- 6.0.0.M1/org/jboss/mx/metadata/xb/ModelMBeanInfoSupportWrapper.java	2009-11-30 14:39:18.000000000 -0600
+++ trunk/org/jboss/mx/metadata/xb/ModelMBeanInfoSupportWrapper.java	2009-12-10 12:42:23.000000000 -0600
@@ -22,25 +22,25 @@
 package org.jboss.mx.metadata.xb;
 
 import java.util.ArrayList;
-import javax.management.modelmbean.ModelMBeanOperationInfo;
+
+import javax.management.Descriptor;
 import javax.management.modelmbean.ModelMBeanAttributeInfo;
 import javax.management.modelmbean.ModelMBeanConstructorInfo;
-import javax.management.modelmbean.ModelMBeanNotificationInfo;
 import javax.management.modelmbean.ModelMBeanInfo;
 import javax.management.modelmbean.ModelMBeanInfoSupport;
-import javax.management.Descriptor;
+import javax.management.modelmbean.ModelMBeanNotificationInfo;
+import javax.management.modelmbean.ModelMBeanOperationInfo;
 
-import org.jboss.logging.Logger;
 import org.jboss.mx.modelmbean.ModelMBeanConstants;
 
 /**
  * A javabean wrapper used to construct a ModelMBeanInfoSupport
  * @author Scott.Stark@jboss.org
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  */
+@SuppressWarnings("unchecked")
 public class ModelMBeanInfoSupportWrapper
 {
-   private static final Logger log = Logger.getLogger(ModelMBeanInfoSupportWrapper.class);
    private String mmbClassName = "org.jboss.mx.modelmbean.XMBean";
 
    private String description;
diff -EbwBru 6.0.0.M1/org/jboss/mx/metadata/xb/ModelMBeanNotificationInfoContainer.java trunk/org/jboss/mx/metadata/xb/ModelMBeanNotificationInfoContainer.java
--- 6.0.0.M1/org/jboss/mx/metadata/xb/ModelMBeanNotificationInfoContainer.java	2009-11-30 14:39:18.000000000 -0600
+++ trunk/org/jboss/mx/metadata/xb/ModelMBeanNotificationInfoContainer.java	2009-12-10 12:42:23.000000000 -0600
@@ -22,26 +22,26 @@
 package org.jboss.mx.metadata.xb;
 
 import java.util.ArrayList;
+
 import javax.management.Descriptor;
-import javax.management.modelmbean.DescriptorSupport;
 import javax.management.modelmbean.ModelMBeanNotificationInfo;
 import javax.xml.namespace.QName;
 
-import org.jboss.xb.binding.GenericValueContainer;
 import org.jboss.logging.Logger;
 import org.jboss.mx.modelmbean.ModelMBeanConstants;
+import org.jboss.xb.binding.GenericValueContainer;
 
 /**
  * The JBossXB ModelMBeanNotificationInfo container
  * @author Scott.Stark@jboss.org
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  */
 public class ModelMBeanNotificationInfoContainer
    implements GenericValueContainer
 {
    private static final Logger log = Logger.getLogger(ModelMBeanNotificationInfoContainer.class);
    private String name;
-   private ArrayList types = new ArrayList();
+   private ArrayList<String> types = new ArrayList<String>();
    private String description;
    private Descriptor descriptor;
 
@@ -91,7 +91,7 @@
          this.description = (String) value;
       }
    }
-   public Class getTargetClass()
+   public Class<?> getTargetClass()
    {
       return ModelMBeanNotificationInfo.class;
    }
diff -EbwBru 6.0.0.M1/org/jboss/mx/metadata/xb/ModelMBeanOperationInfoContainer.java trunk/org/jboss/mx/metadata/xb/ModelMBeanOperationInfoContainer.java
--- 6.0.0.M1/org/jboss/mx/metadata/xb/ModelMBeanOperationInfoContainer.java	2009-11-30 14:39:18.000000000 -0600
+++ trunk/org/jboss/mx/metadata/xb/ModelMBeanOperationInfoContainer.java	2009-12-10 12:42:23.000000000 -0600
@@ -36,7 +36,7 @@
 /**
  * The ModelMBeanOperationInfo JBossXB container 
  * @author Scott.Stark@jboss.org
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  */
 public class ModelMBeanOperationInfoContainer
    implements GenericValueContainer
@@ -46,7 +46,7 @@
    private String returnType = "void";
    private String impact;
    private String description;
-   private ArrayList params = new ArrayList();
+   private ArrayList<MBeanParameterInfo> params = new ArrayList<MBeanParameterInfo>();
    private Descriptor descriptor;
 
    public String getName()
@@ -144,7 +144,7 @@
          this.description = (String) value;
       }
    }
-   public Class getTargetClass()
+   public Class<?> getTargetClass()
    {
       return ModelMBeanOperationInfo.class;
    }
diff -EbwBru 6.0.0.M1/org/jboss/mx/metadata/XMLMetaData.java trunk/org/jboss/mx/metadata/XMLMetaData.java
--- 6.0.0.M1/org/jboss/mx/metadata/XMLMetaData.java	2009-11-30 14:39:18.000000000 -0600
+++ trunk/org/jboss/mx/metadata/XMLMetaData.java	2009-12-10 12:42:23.000000000 -0600
@@ -21,7 +21,7 @@
  */
 package org.jboss.mx.metadata;
 
-// $Id: XMLMetaData.java 81026 2008-11-14 12:51:05Z dimitris@jboss.org $
+// $Id: XMLMetaData.java 85671 2009-03-10 11:05:10Z adrian@jboss.org $
 
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -134,7 +134,7 @@
     *                               to the appropriate XML schema specific builder
     *                               when it is created.
     */
-   public XMLMetaData(String mmbClassName, String resourceClassName, URL url, Map properties)
+   public XMLMetaData(String mmbClassName, String resourceClassName, URL url, Map<String, Object> properties)
    {
       this(mmbClassName, resourceClassName, url);
       setProperties(properties);
@@ -157,7 +157,7 @@
     * @throws  MalformedURLException if the URL string could not be resolved
     */
    public XMLMetaData(String mmbClassName, String resourceClassName,
-                      String url, Map properties) throws MalformedURLException
+                      String url, Map<String, Object> properties) throws MalformedURLException
    {
       this(mmbClassName, resourceClassName, new URL(url), properties);
    }
diff -EbwBru 6.0.0.M1/org/jboss/mx/modelmbean/ModelMBeanConstants.java trunk/org/jboss/mx/modelmbean/ModelMBeanConstants.java
--- 6.0.0.M1/org/jboss/mx/modelmbean/ModelMBeanConstants.java	2009-11-30 14:31:23.000000000 -0600
+++ trunk/org/jboss/mx/modelmbean/ModelMBeanConstants.java	2009-12-10 12:42:24.000000000 -0600
@@ -28,7 +28,7 @@
  * @author  <a href="mailto:thomas.diesler@jboss.com">Thomas Diesler</a>.
  * @author  <a href="mailto:dimitris@jboss.org">Dimitris Andreadis</a>.
  * @author Matt Munz
- * @version $Revision: 81019 $
+ * @version $Revision: 86129 $
  */
 public interface ModelMBeanConstants
 {
diff -EbwBru 6.0.0.M1/org/jboss/mx/modelmbean/ModelMBeanInvoker.java trunk/org/jboss/mx/modelmbean/ModelMBeanInvoker.java
--- 6.0.0.M1/org/jboss/mx/modelmbean/ModelMBeanInvoker.java	2009-11-30 14:39:18.000000000 -0600
+++ trunk/org/jboss/mx/modelmbean/ModelMBeanInvoker.java	2009-12-10 12:42:24.000000000 -0600
@@ -91,7 +91,7 @@
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
  * @author  <a href="mailto:dimitris@jboss.org">Dimitris Andreadis</a>.
  * @author Matt Munz
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  */
 public abstract class ModelMBeanInvoker extends AbstractMBeanInvoker
    implements ModelMBean, ModelMBeanConstants
@@ -145,6 +145,7 @@
     * Model MBean metadata.
     *
     * @param   info  Model MBean metadata
+    * @throws MBeanException for any error
     */
    public ModelMBeanInvoker(ModelMBeanInfo info) throws MBeanException
    {
@@ -432,6 +433,7 @@
     * to load a pre-existing management attribute state for this Model MBean
     * instance. See the Javadoc for <tt>load()</tt> for more information.
     */
+   @SuppressWarnings("unchecked")
    public ObjectName invokePreRegister(MBeanServer server, ObjectName name)
       throws Exception
    {
@@ -526,6 +528,11 @@
    /**
     * initializes the persistence manager based on the info for this bean.
     * If this is successful, loads the bean from the persistence store.
+    * 
+    * @param server 
+    * @param name 
+    * @throws MBeanException 
+    * @throws InstanceNotFoundException 
     */
    protected void initPersistence(MBeanServer server, ObjectName name)
       throws MBeanException, InstanceNotFoundException
@@ -616,6 +623,7 @@
     * @param name - the ModelMBean name
     * @throws Exception
     */
+   @SuppressWarnings("unchecked")
    protected void configureInterceptorStack(ModelMBeanInfo info, MBeanServer server, ObjectName name)
       throws Exception
    {
@@ -704,9 +712,10 @@
    /**
     * 
     * @param d
-    * @return
+    * @return the interceptors
     * @throws Exception
     */
+   @SuppressWarnings("unchecked")
    protected List getInterceptors(Descriptor d) throws Exception
    {
       if (d == null)
@@ -792,6 +801,7 @@
       return interceptors;
    }
 
+   @SuppressWarnings("unchecked")
    protected void setValuesFromMBeanInfo() throws JMException
    {
       for (Iterator it = attributeContextMap.entrySet().iterator(); it.hasNext();)
Only in trunk/org/jboss/mx/modelmbean: PropertyAccess.java
diff -EbwBru 6.0.0.M1/org/jboss/mx/modelmbean/RequiredModelMBeanInstantiator.java trunk/org/jboss/mx/modelmbean/RequiredModelMBeanInstantiator.java
--- 6.0.0.M1/org/jboss/mx/modelmbean/RequiredModelMBeanInstantiator.java	2009-11-30 14:31:23.000000000 -0600
+++ trunk/org/jboss/mx/modelmbean/RequiredModelMBeanInstantiator.java	2009-12-10 12:42:24.000000000 -0600
@@ -27,7 +27,6 @@
 import javax.management.modelmbean.ModelMBeanInfo;
 
 import org.jboss.mx.server.ServerConstants;
-import org.jboss.mx.util.PropertyAccess;
 
 /**
  * ModelMBean instantiator. The ModelMBean implementation
@@ -38,7 +37,7 @@
  *
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
  * @author  <a href="mailto:Adrian@jboss.org">Adrian Brock</a>.
- * @version $Revision: 81019 $
+ * @version $Revision: 86129 $
  */
 public class RequiredModelMBeanInstantiator
 {
@@ -48,7 +47,7 @@
       String className = getClassName();
       try
       {
-         Class modelMBean = cl.loadClass(className);
+         Class<?> modelMBean = cl.loadClass(className);
          return (ModelMBean) modelMBean.newInstance();  
       }
       catch (ClassNotFoundException e)
@@ -71,8 +70,8 @@
       String className = getClassName();
       try 
       {
-         Class modelMBean = cl.loadClass(className);
-         Constructor constructor = modelMBean.getConstructor(new Class[] { ModelMBeanInfo.class });
+         Class<?> modelMBean = cl.loadClass(className);
+         Constructor<?> constructor = modelMBean.getConstructor(new Class[] { ModelMBeanInfo.class });
          return (ModelMBean) constructor.newInstance(new Object[] { info });  
       }
       catch (ClassNotFoundException e)
diff -EbwBru 6.0.0.M1/org/jboss/mx/modelmbean/XMBean.java trunk/org/jboss/mx/modelmbean/XMBean.java
--- 6.0.0.M1/org/jboss/mx/modelmbean/XMBean.java	2009-11-30 14:39:18.000000000 -0600
+++ trunk/org/jboss/mx/modelmbean/XMBean.java	2009-12-10 12:42:24.000000000 -0600
@@ -65,7 +65,7 @@
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
  * @author Matt Munz
  * @author  <a href="mailto:dimitris@jboss.org">Dimitris Andreadis</a>
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  */
 public class XMBean
    extends ModelMBeanInvoker
@@ -77,6 +77,7 @@
    /**
     * Default constructor for the XMBean Model MBean implementation. This
     * creates an uninitialized Model MBean template.
+    * @throws MBeanException for any error
     */
    public XMBean() throws MBeanException
    {
@@ -101,6 +102,7 @@
     * metadata.
     *
     * @param   info  Model MBean metadata describing this MBean template
+    * @throws MBeanException for any error
     */
    public XMBean(ModelMBeanInfo info) throws MBeanException
    {
@@ -154,7 +156,10 @@
     *
     * @param   resource     resource object or descriptor
     * @param   resourceType resource type string or URL to *.xml file
+    * @throws MBeanException 
+    * @throws NotCompliantMBeanException 
     */
+   @SuppressWarnings("unchecked")
    public XMBean(Object resource, String resourceType) throws MBeanException, NotCompliantMBeanException
    {
       // TODO: document STANDARD_MBEAN
@@ -391,6 +396,7 @@
 
    // ModelMBeanInvoker overrides -----------------------------------
 
+   @SuppressWarnings("unchecked")
    protected void configureInterceptorStack(ModelMBeanInfo info,
       MBeanServer server, ObjectName name)
      throws Exception
diff -EbwBru 6.0.0.M1/org/jboss/mx/mxbean/CompositeDataInvocationHandler.java trunk/org/jboss/mx/mxbean/CompositeDataInvocationHandler.java
--- 6.0.0.M1/org/jboss/mx/mxbean/CompositeDataInvocationHandler.java	2009-11-30 14:39:20.000000000 -0600
+++ trunk/org/jboss/mx/mxbean/CompositeDataInvocationHandler.java	2009-12-10 12:42:26.000000000 -0600
@@ -35,7 +35,7 @@
  * CompositeDataInvocationHandler.
  * 
  * @author <a href="adrian@jboss.com">Adrian Brock</a>
- * @version $Revision: 85945 $
+ * @version $Revision: 82920 $
  */
 public class CompositeDataInvocationHandler implements InvocationHandler
 {
diff -EbwBru 6.0.0.M1/org/jboss/mx/mxbean/CompositeDataView.java trunk/org/jboss/mx/mxbean/CompositeDataView.java
--- 6.0.0.M1/org/jboss/mx/mxbean/CompositeDataView.java	2009-11-30 14:39:20.000000000 -0600
+++ trunk/org/jboss/mx/mxbean/CompositeDataView.java	2009-12-10 12:42:26.000000000 -0600
@@ -27,7 +27,7 @@
  * CompositeDataView.
  * 
  * @author <a href="adrian@jboss.com">Adrian Brock</a>
- * @version $Revision: 85945 $
+ * @version $Revision: 82920 $
  */
 public interface CompositeDataView
 {
diff -EbwBru 6.0.0.M1/org/jboss/mx/mxbean/CompositeTypeMetaDataFactory.java trunk/org/jboss/mx/mxbean/CompositeTypeMetaDataFactory.java
--- 6.0.0.M1/org/jboss/mx/mxbean/CompositeTypeMetaDataFactory.java	2009-11-30 14:39:20.000000000 -0600
+++ trunk/org/jboss/mx/mxbean/CompositeTypeMetaDataFactory.java	2009-12-10 12:42:26.000000000 -0600
@@ -29,7 +29,7 @@
  * CompositeTypeMetaDataFactory.
  * 
  * @author <a href="adrian@jboss.com">Adrian Brock</a>
- * @version $Revision: 85945 $
+ * @version $Revision: 85671 $
  */
 public class CompositeTypeMetaDataFactory extends WeakClassCache
 {
@@ -66,11 +66,13 @@
    {
    }
 
+   @SuppressWarnings("unchecked")
    protected Object instantiate(Class clazz)
    {
       return new CompositeTypeMetaData(clazz);
    }
 
+   @SuppressWarnings("unchecked")
    protected void generate(Class clazz, Object object)
    {
       CompositeTypeMetaData metaData = (CompositeTypeMetaData) object;
diff -EbwBru 6.0.0.M1/org/jboss/mx/mxbean/CompositeTypeMetaData.java trunk/org/jboss/mx/mxbean/CompositeTypeMetaData.java
--- 6.0.0.M1/org/jboss/mx/mxbean/CompositeTypeMetaData.java	2009-11-30 14:39:20.000000000 -0600
+++ trunk/org/jboss/mx/mxbean/CompositeTypeMetaData.java	2009-12-10 12:42:26.000000000 -0600
@@ -36,7 +36,7 @@
  * CompositeTypeMetaData.
  * 
  * @author <a href="adrian@jboss.com">Adrian Brock</a>
- * @version $Revision: 85945 $
+ * @version $Revision: 82920 $
  */
 public class CompositeTypeMetaData
 {
diff -EbwBru 6.0.0.M1/org/jboss/mx/mxbean/GetterNames.java trunk/org/jboss/mx/mxbean/GetterNames.java
--- 6.0.0.M1/org/jboss/mx/mxbean/GetterNames.java	2009-11-30 14:39:20.000000000 -0600
+++ trunk/org/jboss/mx/mxbean/GetterNames.java	2009-12-10 12:42:26.000000000 -0600
@@ -31,7 +31,7 @@
  * GetterNames.
  * 
  * @author <a href="adrian@jboss.com">Adrian Brock</a>
- * @version $Revision: 85945 $
+ * @version $Revision: 82920 $
  */
 @Documented
 @Target(ElementType.CONSTRUCTOR)
diff -EbwBru 6.0.0.M1/org/jboss/mx/mxbean/ItemMetaData.java trunk/org/jboss/mx/mxbean/ItemMetaData.java
--- 6.0.0.M1/org/jboss/mx/mxbean/ItemMetaData.java	2009-11-30 14:39:20.000000000 -0600
+++ trunk/org/jboss/mx/mxbean/ItemMetaData.java	2009-12-10 12:42:26.000000000 -0600
@@ -29,7 +29,7 @@
  * ItemMetaData.
  * 
  * @author <a href="adrian@jboss.com">Adrian Brock</a>
- * @version $Revision: 85945 $
+ * @version $Revision: 82920 $
  */
 public class ItemMetaData
 {
diff -EbwBru 6.0.0.M1/org/jboss/mx/mxbean/MXBeanDelegate.java trunk/org/jboss/mx/mxbean/MXBeanDelegate.java
--- 6.0.0.M1/org/jboss/mx/mxbean/MXBeanDelegate.java	2009-11-30 14:39:20.000000000 -0600
+++ trunk/org/jboss/mx/mxbean/MXBeanDelegate.java	2009-12-10 12:42:26.000000000 -0600
@@ -53,7 +53,7 @@
  * 
  * FIXME: Reflection madness
  * @author <a href="adrian@jboss.com">Adrian Brock</a>
- * @version $Revision: 85945 $
+ * @version $Revision: 85671 $
  */
 public class MXBeanDelegate extends NotificationBroadcasterSupport implements DynamicMBean, MBeanRegistration, NotificationEmitter
 {
@@ -64,7 +64,7 @@
    private Object implementation;
 
    /** The management interface */
-   private Class mbeanInterface;
+   private Class<?> mbeanInterface;
 
    /** The cached mbeaninfo */
    private OpenMBeanInfo cachedMBeanInfo;
@@ -92,7 +92,7 @@
     *            does not follow the JMX design patterns or the implementation
     *            does not implement the interface
     */
-   public MXBeanDelegate(Object implementation, Class mbeanInterface) throws NotCompliantMBeanException
+   public MXBeanDelegate(Object implementation, Class<?> mbeanInterface) throws NotCompliantMBeanException
    {
       this.implementation = implementation;
       this.mbeanInterface = mbeanInterface;
@@ -109,7 +109,7 @@
     *            does not follow the JMX design patterns or this
     *            does not implement the interface
     */
-   protected MXBeanDelegate(Class mbeanInterface) throws NotCompliantMBeanException
+   protected MXBeanDelegate(Class<?> mbeanInterface) throws NotCompliantMBeanException
    {
       this.implementation = this;
       this.mbeanInterface = mbeanInterface;
@@ -147,7 +147,7 @@
     *
     * @return the class of the implementation
     */
-   public Class getImplementationClass()
+   public Class<?> getImplementationClass()
    {
       return implementation.getClass();
    }
@@ -157,7 +157,7 @@
     *
     * @return the management interface
     */
-   public final Class getMBeanInterface()
+   public final Class<?> getMBeanInterface()
    {
       return mbeanInterface;
    }
@@ -466,7 +466,7 @@
    private String getSignatureString(Method method)
    {
       String name = method.getName();
-      Class[] signature = method.getParameterTypes();
+      Class<?>[] signature = method.getParameterTypes();
       StringBuilder buffer = new StringBuilder(512);
       buffer.append(name);
       buffer.append("(");
diff -EbwBru 6.0.0.M1/org/jboss/mx/mxbean/MXBeanFactory.java trunk/org/jboss/mx/mxbean/MXBeanFactory.java
--- 6.0.0.M1/org/jboss/mx/mxbean/MXBeanFactory.java	2009-11-30 14:39:20.000000000 -0600
+++ trunk/org/jboss/mx/mxbean/MXBeanFactory.java	2009-12-10 12:42:26.000000000 -0600
@@ -31,7 +31,7 @@
  * MXBeanFactory.
  * 
  * @author <a href="adrian@jboss.com">Adrian Brock</a>
- * @version $Revision: 85945 $
+ * @version $Revision: 82920 $
  */
 public class MXBeanFactory
 {
diff -EbwBru 6.0.0.M1/org/jboss/mx/mxbean/MXBeanInvocationHandler.java trunk/org/jboss/mx/mxbean/MXBeanInvocationHandler.java
--- 6.0.0.M1/org/jboss/mx/mxbean/MXBeanInvocationHandler.java	2009-11-30 14:39:20.000000000 -0600
+++ trunk/org/jboss/mx/mxbean/MXBeanInvocationHandler.java	2009-12-10 12:42:26.000000000 -0600
@@ -51,15 +51,15 @@
  * MXBeanInvocationHandler.
  * 
  * @author <a href="adrian@jboss.com">Adrian Brock</a>
- * @version $Revision: 85945 $
+ * @version $Revision: 85671 $
  */
 public class MXBeanInvocationHandler implements InvocationHandler, Serializable
 {
    /** The serialVersionUID */
    private static final long serialVersionUID = -2872014223541692039L;
    
-   private static final Class[] LISTENER = new Class[] { NotificationListener.class };
-   private static final Class[] TRIPLET = new Class[] { NotificationListener.class, NotificationFilter.class, Object.class };
+   private static final Class<?>[] LISTENER = new Class[] { NotificationListener.class };
+   private static final Class<?>[] TRIPLET = new Class[] { NotificationListener.class, NotificationFilter.class, Object.class };
 
    private static final Method EQUALS;
    private static final Method HASH_CODE;
@@ -210,7 +210,7 @@
       
       Map<Method, Action> result = new HashMap<Method, Action>();
 
-      Class[] interfaces = proxy.getClass().getInterfaces();
+      Class<?>[] interfaces = proxy.getClass().getInterfaces();
       for (int i = 0; i < interfaces.length; ++i)
       {
          if (NotificationBroadcaster.class.isAssignableFrom(interfaces[i]))
@@ -226,8 +226,8 @@
             for (Method method : methods)
             {
                String methodName = method.getName();
-               Class returnType = method.getReturnType();
-               Class[] parameterTypes = method.getParameterTypes();
+               Class<?> returnType = method.getReturnType();
+               Class<?>[] parameterTypes = method.getParameterTypes();
 
                // Getter
                if (methodName.startsWith("get")  && 
@@ -320,7 +320,7 @@
    
    private static String[] getSignature(final Method method)
    {
-      Class[] parameterTypes = method.getParameterTypes();
+      Class<?>[] parameterTypes = method.getParameterTypes();
       String[] signature = new String[parameterTypes.length];
       for (int p = 0; p < parameterTypes.length; ++p)
           signature[p] = parameterTypes[p].getName();
diff -EbwBru 6.0.0.M1/org/jboss/mx/mxbean/MXBean.java trunk/org/jboss/mx/mxbean/MXBean.java
--- 6.0.0.M1/org/jboss/mx/mxbean/MXBean.java	2009-11-30 14:39:20.000000000 -0600
+++ trunk/org/jboss/mx/mxbean/MXBean.java	2009-12-10 12:42:26.000000000 -0600
@@ -31,7 +31,7 @@
  * MXBean.
  * 
  * @author <a href="adrian@jboss.com">Adrian Brock</a>
- * @version $Revision: 85945 $
+ * @version $Revision: 82920 $
  */
 @Documented
 @Target(ElementType.TYPE)
diff -EbwBru 6.0.0.M1/org/jboss/mx/mxbean/MXBeanMetaData.java trunk/org/jboss/mx/mxbean/MXBeanMetaData.java
--- 6.0.0.M1/org/jboss/mx/mxbean/MXBeanMetaData.java	2009-11-30 14:39:20.000000000 -0600
+++ trunk/org/jboss/mx/mxbean/MXBeanMetaData.java	2009-12-10 12:42:26.000000000 -0600
@@ -78,7 +78,7 @@
       Class<?> concrete = mbeanClass;
       while (null != concrete)
       {
-         Class result = findMXBeanInterface(concrete, concrete.getInterfaces());
+         Class<?> result = findMXBeanInterface(concrete, concrete.getInterfaces());
          if (null != result)
             return result;
          concrete = concrete.getSuperclass();
@@ -397,7 +397,7 @@
    private String getSignatureString(Method method)
    {
       String name = method.getName();
-      Class[] signature = method.getParameterTypes();
+      Class<?>[] signature = method.getParameterTypes();
       StringBuffer buffer = new StringBuffer(512);
       buffer.append(name);
       buffer.append("(");
diff -EbwBru 6.0.0.M1/org/jboss/mx/mxbean/MXBeanSupport.java trunk/org/jboss/mx/mxbean/MXBeanSupport.java
--- 6.0.0.M1/org/jboss/mx/mxbean/MXBeanSupport.java	2009-11-30 14:39:20.000000000 -0600
+++ trunk/org/jboss/mx/mxbean/MXBeanSupport.java	2009-12-10 12:42:26.000000000 -0600
@@ -42,7 +42,7 @@
  * MXBeanSupport.
  * 
  * @author <a href="adrian@jboss.com">Adrian Brock</a>
- * @version $Revision: 85945 $
+ * @version $Revision: 82920 $
  */
 public class MXBeanSupport implements DynamicMBean, MBeanRegistration, NotificationEmitter
 {
diff -EbwBru 6.0.0.M1/org/jboss/mx/mxbean/MXBeanUtils.java trunk/org/jboss/mx/mxbean/MXBeanUtils.java
--- 6.0.0.M1/org/jboss/mx/mxbean/MXBeanUtils.java	2009-11-30 14:39:20.000000000 -0600
+++ trunk/org/jboss/mx/mxbean/MXBeanUtils.java	2009-12-10 12:42:26.000000000 -0600
@@ -59,7 +59,7 @@
  * Utils.
  * 
  * @author <a href="adrian@jboss.com">Adrian Brock</a>
- * @version $Revision: 85945 $
+ * @version $Revision: 86129 $
  */
 public class MXBeanUtils
 {
@@ -67,7 +67,7 @@
    private static final Map<Method, String> compositeDataKeyCache = Collections.synchronizedMap(new WeakHashMap<Method, String>()); 
 
    /** A cache of classes to key to getters */
-   private static final Map<Class, Map<String, Method>> compositeDataMethodCache = Collections.synchronizedMap(new WeakHashMap<Class, Map<String, Method>>()); 
+   private static final Map<Class<?>, Map<String, Method>> compositeDataMethodCache = Collections.synchronizedMap(new WeakHashMap<Class<?>, Map<String, Method>>()); 
    
    /** The map key */
    public static final String MAP_KEY = "key";
@@ -87,6 +87,7 @@
     * @param type the type
     * @return the open type
     */
+   @SuppressWarnings("unchecked")
    public static OpenType getOpenType(Type type)
    {
       if (type == null)
@@ -95,7 +96,7 @@
       OpenType result = checkType(type);
       if (result != null)
          return result;
-      Class clazz = (Class) type;
+      Class<?> clazz = (Class) type;
       return CompositeTypeMetaDataFactory.getCompositeType(clazz);
    }
 
@@ -106,7 +107,7 @@
     * @return the open type
     * @throws Exception for any error 
     */
-   public static SimpleType getSimpleType(Class type) throws Exception
+   public static SimpleType getSimpleType(Class<?> type) throws Exception
    {
       SimpleType simpleType = checkSimpleType(type);
       if (simpleType == null)
@@ -286,11 +287,12 @@
     * @param type the type
     * @return return the enum type or null if it is not an enum
     */
+   @SuppressWarnings("unchecked")
    public static SimpleType checkEnum(Type type)
    {
       if (type instanceof Class == false)
          return null;
-      Class clazz = (Class) type;
+      Class<?> clazz = (Class) type;
       if (clazz.isEnum() || Enum.class.equals(clazz))
          return SimpleType.STRING;
       return null;
@@ -302,11 +304,12 @@
     * @param value the value
     * @return the simple type
     */
+   @SuppressWarnings("unchecked")
    public static Object constructSimpleData(Object value)
    {
       if (value != null && value instanceof Enum)
       {
-         Enum enumeration = (Enum) value;
+         Enum<?> enumeration = (Enum) value;
          return enumeration.name();
       }
       return value;
@@ -351,11 +354,12 @@
     * @param type the type
     * @return return the array type or null if it is not an array
     */
+   @SuppressWarnings("unchecked")
    public static ArrayType checkArray(Type type)
    {
       if (type instanceof Class)
       {
-         Class clazz = (Class) type;
+         Class<?> clazz = (Class) type;
          if (clazz.isArray() == false)
             return null;
          int dimension = 1;
@@ -413,6 +417,7 @@
     * @param type the type
     * @return return the array type or null if it is not a collection
     */
+   @SuppressWarnings("unchecked")
    public static ArrayType checkCollection(Type type)
    {
       if (type instanceof ParameterizedType == false)
@@ -451,6 +456,7 @@
     * @param clazz the class
     * @return return the array type or null if it is not a collection
     */
+   @SuppressWarnings("unchecked")
    public static ArrayType checkCollectionClass(Class clazz)
    {
       if (Collection.class.isAssignableFrom(clazz) == false)
@@ -479,6 +485,7 @@
     * @return the open data
     * @throws Exception for any error
     */
+   @SuppressWarnings("unchecked")
    public static Object constructArrayData(OpenType openType, Object value, Object context) throws Exception
    {
       if (value == null)
@@ -488,7 +495,7 @@
       OpenType elementType = arrayType.getElementOpenType();
       int dimension = arrayType.getDimension();
 
-      Class clazz = value.getClass();
+      Class<?> clazz = value.getClass();
       if (clazz.isArray())
       {
          Object[] oldArray = (Object[]) value;
@@ -557,6 +564,7 @@
     * @return the value
     * @throws Exception for any error
     */
+   @SuppressWarnings("unchecked")
    public static Object reconstructArrayData(OpenType openType, Type type, Object value, Object context) throws Exception
    {
       if (value == null)
@@ -604,7 +612,7 @@
     * @return the array
     * @throws Exception for any error
     */
-   private static Object[] reconstructArray(OpenType elementType, Class componentType, int dimension, Object[] oldArray, Object context) throws Exception
+   private static Object[] reconstructArray(OpenType elementType, Class<?> componentType, int dimension, Object[] oldArray, Object context) throws Exception
    {
       if (oldArray == null)
          return null;
@@ -633,6 +641,7 @@
     * @param array the array
     * @return the collection
     */
+   @SuppressWarnings("unchecked")
    private static Collection createCollection(Object[] array)
    {
       return Arrays.asList(array);
@@ -659,6 +668,7 @@
     * @param type the type
     * @return return the tabular type or null if it is not a collection
     */
+   @SuppressWarnings("unchecked")
    public static TabularType checkMap(Type type)
    {
       if (type instanceof ParameterizedType == false)
@@ -687,7 +697,7 @@
     * @param clazz the class
     * @return return the tabular type or null if it is not a collection
     */
-   public static TabularType checkMapClass(Class clazz)
+   public static TabularType checkMapClass(Class<?> clazz)
    {
       if (Map.class.isAssignableFrom(clazz) == false)
          return null;
@@ -791,6 +801,7 @@
     * @return the value
     * @throws Exception for any error
     */
+   @SuppressWarnings("unchecked")
    public static Object reconstructTabularData(OpenType openType, Type type, Object value, Object context) throws Exception
    {
       if (value == null)
@@ -882,7 +893,7 @@
          String name = names[i];
          OpenType itemType = compositeType.getType(name);
          Method method = getCompositeDataMethod(clazz, name, itemType == SimpleType.BOOLEAN);
-         Object itemValue = method.invoke(value, null);
+         Object itemValue = method.invoke(value);
          values[i] = construct(itemType, itemValue, context);
       }
       return new CompositeDataSupport(compositeType, names, values);
@@ -898,6 +909,7 @@
     * @return the value
     * @throws Exception for any error
     */
+   @SuppressWarnings("unchecked")
    public static Object reconstructCompositeData(OpenType openType, Type type, Object value, Object context) throws Exception
    {
       if (value == null)
@@ -928,8 +940,8 @@
 
       StringBuilder fieldName = null;
       
-      Class returnType = method.getReturnType();
-      Class[] paramTypes = method.getParameterTypes();
+      Class<?> returnType = method.getReturnType();
+      Class<?>[] paramTypes = method.getParameterTypes();
       if (Void.TYPE.equals(returnType) == false && paramTypes.length == 0)
       {
          String name = method.getName();
@@ -987,7 +999,7 @@
       Method method = null;
       try
       {
-         method = clazz.getMethod("get" + name, null); 
+         method = clazz.getMethod("get" + name); 
       }
       catch (NoSuchMethodException e)
       {
@@ -995,7 +1007,7 @@
          {
             try
             {
-               method = clazz.getMethod("is" + name, null);
+               method = clazz.getMethod("is" + name);
             }
             catch (NoSuchMethodException ignored)
             {
diff -EbwBru 6.0.0.M1/org/jboss/mx/mxbean/NotificationType.java trunk/org/jboss/mx/mxbean/NotificationType.java
--- 6.0.0.M1/org/jboss/mx/mxbean/NotificationType.java	2009-11-30 14:39:20.000000000 -0600
+++ trunk/org/jboss/mx/mxbean/NotificationType.java	2009-12-10 12:42:26.000000000 -0600
@@ -32,7 +32,7 @@
  * NotificationType.
  * 
  * @author <a href="adrian@jboss.com">Adrian Brock</a>
- * @version $Revision: 85945 $
+ * @version $Revision: 85671 $
  */
 @Documented
 @Inherited
@@ -44,5 +44,5 @@
    String value();
    
    /** The user data class */
-   Class userDataClass() default void.class;
+   Class<?> userDataClass() default void.class;
 }
diff -EbwBru 6.0.0.M1/org/jboss/mx/mxbean/SkeletonOpenType.java trunk/org/jboss/mx/mxbean/SkeletonOpenType.java
--- 6.0.0.M1/org/jboss/mx/mxbean/SkeletonOpenType.java	2009-11-30 14:39:20.000000000 -0600
+++ trunk/org/jboss/mx/mxbean/SkeletonOpenType.java	2009-12-10 12:42:26.000000000 -0600
@@ -32,7 +32,7 @@
  * SkeletonOpenType.
  * 
  * @author <a href="adrian@jboss.com">Adrian Brock</a>
- * @version $Revision: 85945 $
+ * @version $Revision: 85671 $
  */
 public class SkeletonOpenType
 {
@@ -47,12 +47,13 @@
     * 
     * @param type the type
     */
+   @SuppressWarnings("unchecked")
    public SkeletonOpenType(Type type)
    {
       openType = MXBeanUtils.checkType(type);
       if (openType != null)
          return;
-      Class clazz = null;
+      Class<?> clazz = null;
       if (type instanceof ParameterizedType)
       {
          ParameterizedType parameterizedType = (ParameterizedType) type;
diff -EbwBru 6.0.0.M1/org/jboss/mx/notification/ListenerRegistry.java trunk/org/jboss/mx/notification/ListenerRegistry.java
--- 6.0.0.M1/org/jboss/mx/notification/ListenerRegistry.java	2009-11-30 14:31:23.000000000 -0600
+++ trunk/org/jboss/mx/notification/ListenerRegistry.java	2009-12-10 12:42:20.000000000 -0600
@@ -43,7 +43,7 @@
  * @author  <a href="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock</a>.
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
  *
- * @version $Revision: 81019 $
+ * @version $Revision: 85671 $
  *
  * <p><b>Revisions:</b>
  *
@@ -61,7 +61,7 @@
    /**
     * A map of listeners to a list of NotificationRegistrations.
     */
-   private HashMap listeners = new HashMap();
+   private HashMap<NotificationListener, ArrayList<ListenerRegistration>> listeners = new HashMap<NotificationListener, ArrayList<ListenerRegistration>>();
 
    /**
     * The factory used to generate the listener registration.
@@ -106,6 +106,7 @@
     * @exception IllegalArgumentException for a null listener
     * @exception JMException for an error adding to the registry
     */
+   @SuppressWarnings("unchecked")
    public void add(NotificationListener listener, NotificationFilter filter, Object handback)
       throws JMException
    {
@@ -114,12 +115,12 @@
 
       synchronized(listeners)
       {
-         HashMap newListeners = (HashMap) listeners.clone();
+         HashMap<NotificationListener, ArrayList<ListenerRegistration>> newListeners = cloneListeners();
 
-         ArrayList registrations = (ArrayList) newListeners.get(listener);
+         ArrayList<ListenerRegistration> registrations = newListeners.get(listener);
          if (registrations == null)
          {
-            registrations = new ArrayList();
+            registrations = new ArrayList<ListenerRegistration>();
             newListeners.put(listener, registrations);
          }
          else
@@ -143,25 +144,22 @@
    public void remove(NotificationListener listener)
       throws ListenerNotFoundException
    {
-      ArrayList registrations = null;
+      ArrayList<ListenerRegistration> registrations = null;
       synchronized(listeners)
       {
          if (listeners.containsKey(listener) == false)
             throw new ListenerNotFoundException("Listener not found " + listener);
 
-         HashMap newListeners = (HashMap) listeners.clone();
+         HashMap<NotificationListener, ArrayList<ListenerRegistration>> newListeners = cloneListeners();
 
-         registrations = (ArrayList) newListeners.remove(listener);
+         registrations = newListeners.remove(listener);
 
          listeners = newListeners;
       }
 
-      for (Iterator iterator = registrations.iterator(); iterator.hasNext();)
-      {
-          ListenerRegistration registration = (ListenerRegistration) iterator.next();
+      for (ListenerRegistration registration : registrations)
           registration.removed();
       }
-   }
 
    /**
     * Removes only the registrations for a listener that match the filter and handback.
@@ -171,13 +169,14 @@
     * @param handback the handback object of the registration to remove
     * @exception ListenerNotFoundException when the listener is not registered
     */
+   @SuppressWarnings("unchecked")
    public void remove(NotificationListener listener, NotificationFilter filter, Object handback)
       throws ListenerNotFoundException
    {
       ListenerRegistration registration = null;
       synchronized(listeners)
       {
-         ArrayList registrations = (ArrayList) listeners.get(listener);
+         ArrayList<ListenerRegistration> registrations = listeners.get(listener);
          if (registrations == null)
             throw new ListenerNotFoundException("No registristrations for listener not listener=" + listener +
                                                 " filter=" + filter + " handback=" + handback);
@@ -188,10 +187,10 @@
             throw new ListenerNotFoundException("Listener not found listener=" + listener +
                                                 " filter=" + filter + " handback=" + handback);
 
-         HashMap newListeners = (HashMap) listeners.clone();
+         HashMap<NotificationListener, ArrayList<ListenerRegistration>> newListeners = cloneListeners();
 
          registrations = (ArrayList) registrations.clone();
-         registration = (ListenerRegistration) registrations.remove(index);
+         registration = registrations.remove(index);
          if (registrations.isEmpty())
             newListeners.remove(listener);
          else
@@ -237,13 +236,19 @@
       return listeners.isEmpty();
    }
 
+   @SuppressWarnings("unchecked")
+   private HashMap<NotificationListener, ArrayList<ListenerRegistration>> cloneListeners()
+   {
+      return (HashMap) listeners.clone();
+   }
+
    // Inner Classes -------------------------------------------------
 
    public class ListenerRegistrationIterator
-      implements Iterator
+      implements Iterator<ListenerRegistration>
    {
-      private Iterator listenerIterator;
-      private Iterator registrationIterator;
+      private Iterator<ArrayList<ListenerRegistration>> listenerIterator;
+      private Iterator<ListenerRegistration> registrationIterator;
 
       /**
        * Constructs a new ListenerRegistration iterator
@@ -262,14 +267,14 @@
                if (listenerIterator.hasNext() == false)
                   return false;
 
-               registrationIterator = ((ArrayList) listenerIterator.next()).iterator();
+               registrationIterator = listenerIterator.next().iterator();
             }
             while (registrationIterator.hasNext() == false);
          }
          return true;
       }
 
-      public Object next()
+      public ListenerRegistration next()
       {
          if (hasNext() == false)
             throw new NoSuchElementException("Use hasNext before next");
@@ -279,14 +284,16 @@
 
       /**
        * Convenience method to returned a typed object
+       * 
+       * @return the registration
        */
       public ListenerRegistration nextRegistration()
       {
-         return (ListenerRegistration) next();
+         return next();
       }
 
       /**
-       * @exception UnsupportedOpertionException remove is not supported
+       * @exception UnsupportedOperationException remove is not supported
        */
       public void remove()
       {
diff -EbwBru 6.0.0.M1/org/jboss/mx/notification/MBeanServerListenerRegistrationFactory.java trunk/org/jboss/mx/notification/MBeanServerListenerRegistrationFactory.java
--- 6.0.0.M1/org/jboss/mx/notification/MBeanServerListenerRegistrationFactory.java	2009-11-30 14:38:47.000000000 -0600
+++ trunk/org/jboss/mx/notification/MBeanServerListenerRegistrationFactory.java	2009-12-10 12:42:44.000000000 -0600
@@ -34,7 +34,7 @@
  * @see org.jboss.mx.notification.ListenerRegistration
  * 
  * @author  <a href="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock</a>.
- * @version $Revision: 81022 $
+ * @version $Revision: 85671 $
  */
 public class MBeanServerListenerRegistrationFactory
    implements ListenerRegistrationFactory
@@ -53,7 +53,7 @@
     * Construct a listener registration factory for the given object name
     *
     * @param name the object name
-    * @param name the notification broadcaster
+    * @param broadcaster the notification broadcaster
     * @exception IllegalArgumentException for a null object name
     */
    public MBeanServerListenerRegistrationFactory(ObjectName name, NotificationBroadcaster broadcaster)
diff -EbwBru 6.0.0.M1/org/jboss/mx/notification/MBeanServerListenerRegistry.java trunk/org/jboss/mx/notification/MBeanServerListenerRegistry.java
--- 6.0.0.M1/org/jboss/mx/notification/MBeanServerListenerRegistry.java	2009-11-30 14:38:47.000000000 -0600
+++ trunk/org/jboss/mx/notification/MBeanServerListenerRegistry.java	2009-12-10 12:42:44.000000000 -0600
@@ -37,7 +37,7 @@
  * @author  <a href="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock</a>.
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>
  *
- * @version $Revision: 81022 $
+ * @version $Revision: 85671 $
  *
  * <p><b>Revisions:</b>
  *
@@ -48,6 +48,7 @@
  * </ul>
  *
  */
+@SuppressWarnings("unchecked")
 public class MBeanServerListenerRegistry
 {
    // Attributes ----------------------------------------------------
diff -EbwBru 6.0.0.M1/org/jboss/mx/notification/NotificationFilterProxy.java trunk/org/jboss/mx/notification/NotificationFilterProxy.java
--- 6.0.0.M1/org/jboss/mx/notification/NotificationFilterProxy.java	2009-11-30 14:31:23.000000000 -0600
+++ trunk/org/jboss/mx/notification/NotificationFilterProxy.java	2009-12-10 12:42:20.000000000 -0600
@@ -32,7 +32,7 @@
  * real filter.
  *
  * @author <a href="mailto:jhaynie@vocalocity.net">Jeff Haynie</a>
- * @version $Revision: 81019 $
+ * @version $Revision: 85671 $
  */
 public class NotificationFilterProxy implements NotificationFilter
 {
@@ -63,7 +63,7 @@
     /**
      * return the real ObjectName source
      *
-     * @return
+     * @return the source
      */
     public ObjectName getSource ()
     {
@@ -72,7 +72,7 @@
     /**
      * return the real NotificationFilter
      *
-     * @return
+     * @return the filter
      */
     public NotificationFilter getFilter ()
     {
diff -EbwBru 6.0.0.M1/org/jboss/mx/notification/NotificationListenerProxy.java trunk/org/jboss/mx/notification/NotificationListenerProxy.java
--- 6.0.0.M1/org/jboss/mx/notification/NotificationListenerProxy.java	2009-11-30 14:38:47.000000000 -0600
+++ trunk/org/jboss/mx/notification/NotificationListenerProxy.java	2009-12-10 12:42:44.000000000 -0600
@@ -37,8 +37,9 @@
  *
  * @author  <a href="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock</a>.
  * @author  <a href="mailto:telrod@e2technologies.net">Tom Elrod</a>.
- * @version $Revision: 81022 $
+ * @version $Revision: 85671 $
  */
+@SuppressWarnings("unchecked")
 public class NotificationListenerProxy
    implements InvocationHandler
 {
diff -EbwBru 6.0.0.M1/org/jboss/mx/persistence/DelegatingPersistenceManager.java trunk/org/jboss/mx/persistence/DelegatingPersistenceManager.java
--- 6.0.0.M1/org/jboss/mx/persistence/DelegatingPersistenceManager.java	2009-11-30 14:39:19.000000000 -0600
+++ trunk/org/jboss/mx/persistence/DelegatingPersistenceManager.java	2009-12-10 12:42:25.000000000 -0600
@@ -47,7 +47,7 @@
  * MBean attributes.  
  *
  * @author  <a href="mailto:dimitris@jboss.org">Dimitris Andreadis</a>
- * @version $Revision: 81026 $
+ * @version $Revision: 86129 $
  */
 public class DelegatingPersistenceManager
    implements PersistenceManager
@@ -88,8 +88,9 @@
          init(invoker, metadata);
       }
 
-      if (log.isDebugEnabled())
-         log.debug("load() called for: '" + this.persistName + "'");
+      boolean trace = log.isTraceEnabled();
+      if (trace)
+         log.trace("load() called for: '" + this.persistName + "'");
       
       AttributeList attrs = null;
       
@@ -111,8 +112,8 @@
             // will triger a store() that should be ignored
             setIsLoading(true);
            
-            if (log.isDebugEnabled())
-               log.debug("loading attributes: " + attrs);
+            if (trace)
+               log.trace("loading attributes: " + attrs);
             invoker.setAttributes(attrs);
          }
          finally {
@@ -120,8 +121,8 @@
          }
       }
       else {
-         if (log.isDebugEnabled())
-            log.debug("No attributes to load");
+         if (trace)
+            log.trace("No attributes to load");
       }
    }
       
@@ -149,8 +150,9 @@
          return; // ignore call
       }
       else {
-         if (log.isDebugEnabled())
-            log.debug("store() called for: '" + this.persistName + "'");
+         boolean trace = log.isTraceEnabled();
+         if (trace)
+            log.trace("store() called for: '" + this.persistName + "'");
          
          // placehold for attributes to be persisted
          AttributeList attributes = new AttributeList();
@@ -158,8 +160,8 @@
          // iterate over all attributes in metadata
          MBeanAttributeInfo[] attrs = metadata.getAttributes();
          
-         if (log.isDebugEnabled() && attrs.length > 0)
-            log.debug("store() --- ModelMBeanAttributeInfo[] ---");
+         if (trace && attrs.length > 0)
+            log.trace("store() --- ModelMBeanAttributeInfo[] ---");
          
          for (int i = 0; i < attrs.length; i++)
          {
@@ -167,8 +169,8 @@
             // create a new Attribute object and add it to the collection.
             ModelMBeanAttributeInfo attributeInfo = (ModelMBeanAttributeInfo)attrs[i];
             
-            if (log.isDebugEnabled())
-               log.debug("  attr (#" + i + ") - " + attributeInfo);
+            if (trace)
+               log.trace("  attr (#" + i + ") - " + attributeInfo);
             
             if (attributeInfo.isWritable()) {
 	            Descriptor attrDesc = attributeInfo.getDescriptor();
@@ -195,18 +197,18 @@
          try {
             if (!attributes.isEmpty()) {
                
-               if (log.isDebugEnabled())
-                  log.debug("calling persistor.store(" + this.persistName + ") attrs=" + attributes);
+               if (trace)
+                  log.trace("calling persistor.store(" + this.persistName + ") attrs=" + attributes);
                
                persistor.store(this.persistName, attributes);
             }
             else {
-               if (log.isDebugEnabled())
-                  log.debug("nothing to persist");
+               if (trace)
+                  log.trace("nothing to persist");
             }
          }
          catch (Exception e) {
-            log.warn("cought exception during store()", e);
+            log.warn("caught exception during store()", e);
          }
       }
    }
@@ -218,15 +220,19 @@
     * 
     * Gets the external persistor to use and decides on the
     * persistName to use for this MBean load()/store() calls.
+    * @param invoker 
+    * @param metadata 
+    * @throws MBeanException 
     */
    protected void init(ModelMBeanInvoker invoker, MBeanInfo metadata)
          throws MBeanException
    {
       Descriptor desc = ((ModelMBeanInfo)metadata).getMBeanDescriptor();
       
-      if (log.isDebugEnabled()) {
-         log.debug("init() --- ModelMBeanInfo Descriptor --- ");
-         log.debug(desc);
+      boolean trace = log.isTraceEnabled();
+      if (trace) {
+         log.trace("init() --- ModelMBeanInfo Descriptor --- ");
+         log.trace(desc);
       }
       
       // Decide what to use as a persistent name (id) for this MBean
@@ -249,8 +255,8 @@
          }
       }
       
-      if (log.isDebugEnabled())
-         log.debug("chosen persistent id: '" + this.persistName + "'");
+      if (trace)
+         log.trace("chosen persistent id: '" + this.persistName + "'");
 
       // get the name of the MBean factory service that creates
       // the AttributePersistenceManager implementation
@@ -292,12 +298,14 @@
          throw new MBeanException(e);
       }
       
-      if (log.isDebugEnabled())
-         log.debug("using AttributePersistenceManager: " + this.persistor.getClass().getName());
+      if (trace)
+         log.trace("using AttributePersistenceManager: " + this.persistor.getClass().getName());
    }
    
    /**
     * Check if we are loading state
+    * 
+    * @return true if loading
     */
    protected boolean isLoading()
    {
diff -EbwBru 6.0.0.M1/org/jboss/mx/persistence/MbeanInfoDbPm.java trunk/org/jboss/mx/persistence/MbeanInfoDbPm.java
--- 6.0.0.M1/org/jboss/mx/persistence/MbeanInfoDbPm.java	2009-11-30 14:39:19.000000000 -0600
+++ trunk/org/jboss/mx/persistence/MbeanInfoDbPm.java	2009-12-10 12:42:25.000000000 -0600
@@ -49,6 +49,7 @@
  * Class responsible for storing and loading the MBean info database.
  * @author Matt Munz
  */
+@SuppressWarnings("unchecked")
 public class MbeanInfoDbPm
    extends MBeanInfoOdb
    implements PersistenceManager
@@ -218,6 +219,8 @@
    /**
     * Iterates over the loaded MBean infos and ObjectNames, creates an MBean for each, and
     * registers it with the server.  This includes creating the resource object as well.
+    * @throws JMException 
+    * @throws InvalidTargetObjectTypeException 
     */
    protected void register() throws JMException, 
                                     InvalidTargetObjectTypeException
@@ -276,6 +279,10 @@
     * JDK 1.3.1 substitute for jdk 1.4.1 String.replaceAll()
     * Does not accept regular expressions...
     * returns the object string where all instances of target are replaced with replacement
+    * @param object 
+    * @param target 
+    * @param replacement 
+    * @return the string
     * @todo replace with a more appropriate string util if available
     */
    protected String replaceAll(String object, String target, String replacement)
@@ -285,6 +292,11 @@
    
    /**
     * Iterative
+    * @param object 
+    * @param target 
+    * @param replacement 
+    * @param curIndex 
+    * @return the string
     */
    protected String replaceAll(String object, String target, String replacement, int curIndex)
    {
diff -EbwBru 6.0.0.M1/org/jboss/mx/server/AbstractMBeanInvoker.java trunk/org/jboss/mx/server/AbstractMBeanInvoker.java
--- 6.0.0.M1/org/jboss/mx/server/AbstractMBeanInvoker.java	2009-11-30 14:39:19.000000000 -0600
+++ trunk/org/jboss/mx/server/AbstractMBeanInvoker.java	2009-12-10 12:42:25.000000000 -0600
@@ -72,15 +72,16 @@
  * @author <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
  * @author <a href="mailto:scott.stark@jboss.org">Scott Stark</a>.
  * @author <a href="mailto:dimitris@jboss.org">Dimitris Andreadis</a>.
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  */
+@SuppressWarnings("unchecked")
 public abstract class AbstractMBeanInvoker
    implements MBeanInvoker
 {
    /**
     * Used to propagate the MBeanEntry during the preRegister callback
     */
-   static ThreadLocal preRegisterInfo = new ThreadLocal();
+   static ThreadLocal<MBeanEntry> preRegisterInfo = new ThreadLocal<MBeanEntry>();
 
    // Attributes ----------------------------------------------------
 
@@ -135,11 +136,11 @@
 
    /**
     * An accessor for the MBeanEntry thread local
-    * @return
+    * @return the mbean Entry
     */
    public static MBeanEntry getMBeanEntry()
    {
-      return (MBeanEntry) preRegisterInfo.get();
+      return preRegisterInfo.get();
    }
    // Constructors --------------------------------------------------
 
@@ -152,6 +153,8 @@
 
    /**
     * Constructs a new invoker with a given target resource.
+    * 
+    * @param resource the resource
     */
    public AbstractMBeanInvoker(Object resource)
    {
@@ -607,7 +610,7 @@
     */
    public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception
    {
-      this.resourceEntry = (MBeanEntry) preRegisterInfo.get();
+      this.resourceEntry = preRegisterInfo.get();
       this.server = server;
 
       ObjectName mbeanName = null;
diff -EbwBru 6.0.0.M1/org/jboss/mx/server/ExceptionHandler.java trunk/org/jboss/mx/server/ExceptionHandler.java
--- 6.0.0.M1/org/jboss/mx/server/ExceptionHandler.java	2009-11-30 14:31:24.000000000 -0600
+++ trunk/org/jboss/mx/server/ExceptionHandler.java	2009-12-10 12:42:26.000000000 -0600
@@ -21,7 +21,7 @@
  */
 package org.jboss.mx.server;
 
-// $Id: ExceptionHandler.java 81019 2008-11-14 12:40:42Z dimitris@jboss.org $
+// $Id: ExceptionHandler.java 86129 2009-03-19 20:48:17Z adrian@jboss.org $
 
 import javax.management.*;
 
diff -EbwBru 6.0.0.M1/org/jboss/mx/server/Interceptable.java trunk/org/jboss/mx/server/Interceptable.java
--- 6.0.0.M1/org/jboss/mx/server/Interceptable.java	2009-11-30 14:39:19.000000000 -0600
+++ trunk/org/jboss/mx/server/Interceptable.java	2009-12-10 12:42:25.000000000 -0600
@@ -27,13 +27,19 @@
  * Interface to allow the dynamic introduction of Interceptors
  * 
  * @author  <a href="mailto:dimitris@jboss.org">Dimitris Andreadis</a>.
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  */
 public interface Interceptable
 {
-   /** Add dynamically an operation interceptor, first in the chain */
+   /** Add dynamically an operation interceptor, first in the chain
+    * 
+    *  @param interceptor the interceptor
+    */
    void addOperationInterceptor(Interceptor interceptor);
    
-   /** Remove the specified operation interceptor */
+   /** Remove the specified operation interceptor 
+    * 
+    *  @param interceptor the interceptor
+    */
    void removeOperationInterceptor(Interceptor interceptor);
 }
diff -EbwBru 6.0.0.M1/org/jboss/mx/server/InvocationContext.java trunk/org/jboss/mx/server/InvocationContext.java
--- 6.0.0.M1/org/jboss/mx/server/InvocationContext.java	2009-11-30 14:39:19.000000000 -0600
+++ trunk/org/jboss/mx/server/InvocationContext.java	2009-12-10 12:42:26.000000000 -0600
@@ -35,8 +35,9 @@
  * @author <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
  * @author <a href="mailto:d_jencks@users.sourceforge.net">David Jencks</a>
  * @author <a href="mailto:dimitris@jboss.org">Dimitris Andreadis</a>
- * @version $Revision: 89133 $
+ * @version $Revision: 89134 $
  */
+@SuppressWarnings("unchecked")
 public class InvocationContext
 {
 
@@ -51,9 +52,9 @@
    public final static String ATTRIBUTE_ACCESS   = "attribute.access";
 
    /* Marker for void */
-   private static final Class VOID = Void.class;
+   private static final Class<?> VOID = Void.class;
 
-   public static final Class[] NOCLASSES = new Class[0];
+   public static final Class<?>[] NOCLASSES = new Class[0];
    
    // Attributes ----------------------------------------------------
 
diff -EbwBru 6.0.0.M1/org/jboss/mx/server/Invocation.java trunk/org/jboss/mx/server/Invocation.java
--- 6.0.0.M1/org/jboss/mx/server/Invocation.java	2009-11-30 14:39:19.000000000 -0600
+++ trunk/org/jboss/mx/server/Invocation.java	2009-12-10 12:42:26.000000000 -0600
@@ -29,7 +29,7 @@
 /**
  *
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  *   
  */
 public class Invocation
@@ -111,17 +111,17 @@
       return buffer.toString();
    }
    
-   public Class getAttributeTypeClass() throws ClassNotFoundException
+   public Class<?> getAttributeTypeClass() throws ClassNotFoundException
    {
       return ctx.getAttributeTypeClass();
    }
 
-   public Class getReturnTypeClass() throws ClassNotFoundException
+   public Class<?> getReturnTypeClass() throws ClassNotFoundException
    {
       return ctx.getReturnTypeClass();
    }
 
-   public Class[] getSignatureClasses() throws ClassNotFoundException
+   public Class<?>[] getSignatureClasses() throws ClassNotFoundException
    {
       return ctx.getSignatureClasses();
    }
Only in trunk/org/jboss/mx/server: JBossMXMBeanServerDelegate.java
diff -EbwBru 6.0.0.M1/org/jboss/mx/server/JBossMXServerConfig.java trunk/org/jboss/mx/server/JBossMXServerConfig.java
--- 6.0.0.M1/org/jboss/mx/server/JBossMXServerConfig.java	2009-11-30 14:38:47.000000000 -0600
+++ trunk/org/jboss/mx/server/JBossMXServerConfig.java	2009-12-10 12:42:44.000000000 -0600
@@ -23,15 +23,13 @@
 
 import javax.management.ObjectName;
 
-import org.jboss.mx.standardmbean.StandardMBeanDelegateFactory;
-import org.jboss.mx.standardmbean.StandardMBeanFactoryImpl;
 import org.jboss.mx.util.ObjectNameFactory;
 
 /**
  * JBossMX Server configuration.
  * 
  * @author  <a href="mailto:adrian@jboss.com">Adrian Brock</a>.
- * @version $Revision: 81022 $
+ * @version $Revision: 86129 $
  */
 public class JBossMXServerConfig extends ServerConfig implements ServerConstants
 {
@@ -60,11 +58,6 @@
       return DEFAULT_MBEAN_SERVER_BUILDER_CLASS;
    }
 
-   public StandardMBeanDelegateFactory getStandardMBeanDelegateFactory()
-   {
-      return new StandardMBeanFactoryImpl();
-   }
-
    // Protected ---------------------------------------------------
    
    // Private -----------------------------------------------------
diff -EbwBru 6.0.0.M1/org/jboss/mx/server/MBeanServerBuilderImpl.java trunk/org/jboss/mx/server/MBeanServerBuilderImpl.java
--- 6.0.0.M1/org/jboss/mx/server/MBeanServerBuilderImpl.java	2009-11-30 14:38:47.000000000 -0600
+++ trunk/org/jboss/mx/server/MBeanServerBuilderImpl.java	2009-12-10 12:42:44.000000000 -0600
@@ -35,19 +35,11 @@
  * @see org.jboss.mx.server.MBeanServerImpl
  * 
  * @author  <a href="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock</a>.
- * @version $Revision: 81022 $
+ * @version $Revision: 86129 $
  */
 public class MBeanServerBuilderImpl
    extends MBeanServerBuilder
 {
-   // Constants ---------------------------------------------------
-
-   // Attributes --------------------------------------------------
-
-   // Static  -----------------------------------------------------
-
-   // Constructors ------------------------------------------------
-
    /**
     * Construct an MBeanServerBuilder
     */
@@ -76,20 +68,6 @@
     */
    public MBeanServerDelegate newMBeanServerDelegate()
    {
-      return new MBeanServerDelegate();
+      return new JBossMXMBeanServerDelegate();
    }
-
-   // Public ------------------------------------------------------
-
-   // X Implementation --------------------------------------------
-
-   // Y Overrides -------------------------------------------------
-
-   // Protected ---------------------------------------------------
-
-   // Package Private ---------------------------------------------
-
-   // Private -----------------------------------------------------
-
-   // Inner Classes -----------------------------------------------
 }
diff -EbwBru 6.0.0.M1/org/jboss/mx/server/MBeanServerImpl.java trunk/org/jboss/mx/server/MBeanServerImpl.java
--- 6.0.0.M1/org/jboss/mx/server/MBeanServerImpl.java	2009-11-30 14:38:47.000000000 -0600
+++ trunk/org/jboss/mx/server/MBeanServerImpl.java	2009-12-10 12:42:44.000000000 -0600
@@ -89,7 +89,6 @@
 import org.jboss.mx.server.registry.MBeanRegistry;
 import org.jboss.mx.service.ServiceConstants;
 import org.jboss.mx.util.JMXExceptionDecoder;
-import org.jboss.mx.util.PropertyAccess;
 import org.jboss.util.NestedRuntimeException;
 
 /**
@@ -127,8 +126,9 @@
  * @author  <a href="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock</a>.
  * @author  <a href="mailto:thomas.diesler@jboss.com">Thomas Diesler</a>.
  * @author Scott.Stark@jboss.org
- * @version $Revision: 81022 $
+ * @version $Revision: 86129 $
  */
+@SuppressWarnings("unchecked")
 public class MBeanServerImpl
    implements MBeanServer, ServerConstants, ServiceConstants, ModelMBeanConstants
 {
@@ -199,6 +199,8 @@
       this.classLoaderRepository = getClassLoaderRepository();
 
       // the second first thing to do is to create a registry instance
+      if (defaultDomain == null)
+         defaultDomain = DEFAULT_DOMAIN;
       this.registry = createRegistry(defaultDomain);
       
       // The first MBean to be registered should be the server delegate
@@ -1075,7 +1077,7 @@
     * 
     * @param name The ObjectName of the ClassLoader. May be null, in which case
     * the MBean server's own ClassLoader is returned.
-    * @return
+    * @return the classloader
     * @throws InstanceNotFoundException
     */ 
    public ClassLoader getClassLoader(ObjectName name)
@@ -1174,6 +1176,7 @@
     * @param cl the thread classloader, pass null to use the ClassLoaderRepository
     * @param params the parameters for the constructor
     * @param signature the signature of the constructor
+    * @return the object
     * @exception ReflectionException wraps a ClassCastException or
     *            any Exception trying to invoke the constructor
     * @exception MBeanException wraps any exception thrown by the constructor
@@ -1256,6 +1259,10 @@
 
    /**
     * Handles errors thrown during class instantiation
+    * @param t 
+    * @param className 
+    * @throws ReflectionException 
+    * @throws MBeanException 
     */
    protected void handleInstantiateExceptions(Throwable t, String className)
            throws ReflectionException, MBeanException
@@ -1327,10 +1334,14 @@
     * @param name the object name to register
     * @param loaderName the object name of a class loader also used as
     *        as the MBeans TCL
+    * @return the object instance
+    * @throws ReflectionException 
     * @exception InstanceAlreadyExistsException when already registered
     * @exception MBeanRegistrationException when
     *            preRegister(MBeanServer, ObjectName) throws an exception
+    * @throws MBeanException 
     * @exception NotCompliantMBeanException when the object is not an MBean
+    * @throws InstanceNotFoundException 
     */
    protected ObjectInstance registerMBean(Object mbean, ObjectName name, ObjectName loaderName)
            throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException
@@ -1368,6 +1379,7 @@
     * @param object the mbean to register
     * @param name the object name to register
     * @param cl the thread classloader, pass null for the current one
+    * @return the object instance
     * @exception InstanceAlreadyExistsException when already registered
     * @exception MBeanRegistrationException when
     *            preRegister(MBeanServer, ObjectName) throws an exception
diff -EbwBru 6.0.0.M1/org/jboss/mx/server/MethodMapper.java trunk/org/jboss/mx/server/MethodMapper.java
--- 6.0.0.M1/org/jboss/mx/server/MethodMapper.java	2009-11-30 14:39:19.000000000 -0600
+++ trunk/org/jboss/mx/server/MethodMapper.java	2009-12-10 12:42:25.000000000 -0600
@@ -39,8 +39,9 @@
  * @author <a href="mailto:juha@jboss.org">Juha Lindfors</a>
  * @author <a href="mailto:scott.stark@jboss.org">Scott Stark</a>
  * @author <a href="mailto:dimitris@jboss.org">Dimitris Andreadis</a>
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  */
+@SuppressWarnings("unchecked")
 public class MethodMapper
 {
    // Attributes ----------------------------------------------------
@@ -51,6 +52,9 @@
    
    /**
     * Generates a signature string for an attribute getter method using standard rules
+    * 
+    * @param info the info
+    * @return signature
     */
    public static String getterSignature(MBeanAttributeInfo info)
    {
@@ -78,6 +82,9 @@
 
    /**
     * Generates a signature string for an attribute setter method using standard rules
+    * 
+    * @param info the info
+    * @return signature
     */
    public static String setterSignature(MBeanAttributeInfo info)
    {
@@ -106,6 +113,9 @@
 
    /**
     * Generates a signature string using the operation info.
+    * 
+    * @param info the info
+    * @return signature
     */
    public static String operationSignature(MBeanOperationInfo info)
    {
@@ -125,6 +135,9 @@
 
    /**
     * Generates a signature string using a Method object.
+    * 
+    * @param method the method
+    * @return signature
     */
    public static String methodSignature(Method method)
    {
@@ -144,6 +157,11 @@
 
    /**
     * Generates a signature string using the supplied signature arguments.
+    * 
+    * @param returnType the return type
+    * @param name the name
+    * @param signature the signature
+    * @return signature
     */
    public static String methodSignature(String returnType, String name, String[] signature)
    {
@@ -206,6 +224,8 @@
    
    /**
     * Constructs a mapper by reflecting on the class.
+    * 
+    * @param resourceClass the resource class
     */
    public MethodMapper(Class resourceClass)
    {
@@ -217,6 +237,9 @@
    
    /**
     * Return a method matching the signature defined in the operation info
+    * 
+    * @param info the info
+    * @return the method
     */
    public Method lookupOperation(MBeanOperationInfo info)
    {
@@ -230,6 +253,9 @@
 
    /**
     * Return a method matching the getter signature expected for an attribute.
+    * 
+    * @param info the info
+    * @return the method
     */
    public Method lookupGetter(MBeanAttributeInfo info)
    {
@@ -243,6 +269,9 @@
 
    /**
     * Return a method matching the setter signature expected for an attribute
+    * 
+    * @param info the info
+    * @return the method
     */
    public Method lookupSetter(MBeanAttributeInfo info)
    {
@@ -256,6 +285,11 @@
 
    /**
     * Return a method matching the specified signature
+    * 
+    * @param returnType the return type
+    * @param name the name
+    * @param signature the signature
+    * @return the method
     */
    public Method lookupMethod(String returnType, String name, String[] signature)
    {
@@ -281,6 +315,9 @@
    
    /**
     * creates the signature string to Method HashMap.
+    * 
+    * @param resourceClass the resource class
+    * @return the map
     */
    protected HashMap createMap(Class resourceClass)
    {
diff -EbwBru 6.0.0.M1/org/jboss/mx/server/ObjectInputStreamWithClassLoader.java trunk/org/jboss/mx/server/ObjectInputStreamWithClassLoader.java
--- 6.0.0.M1/org/jboss/mx/server/ObjectInputStreamWithClassLoader.java	2009-11-30 14:31:24.000000000 -0600
+++ trunk/org/jboss/mx/server/ObjectInputStreamWithClassLoader.java	2009-12-10 12:42:44.000000000 -0600
@@ -63,8 +63,9 @@
     /**
     * Construct a new instance with the given classloader and input stream.
     *
-    * @param  ClassLoader      classloader to use
-    * @param  InputStream      stream to read objects from
+    * @param  cl      classloader to use
+    * @param  in      stream to read objects from
+    * @throws IOException for any error
     */
     public ObjectInputStreamWithClassLoader(InputStream in, ClassLoader cl)
          throws IOException {
@@ -88,21 +89,21 @@
     * default classloader (implemented by the super class). If it cannot
     * load the class, try the classloader given to this instance.
     *
-    * @param  ObjectStreamClass     class description object
+    * @param  osc     class description object
     * @return      the Class corresponding to class description
     * @exception   IOException     if an I/O error occurs
     * @exception   ClassNotFoundException  if the class cannot be found by the classloader
     */
-    protected Class resolveClass(ObjectStreamClass osc)
+    protected Class<?> resolveClass(ObjectStreamClass osc)
         throws IOException, ClassNotFoundException {
 
         return cl.loadClass(osc.getName());
     }
     
-    protected Class resolveProxyClass( String[] interfaces )
+    protected Class<?> resolveProxyClass( String[] interfaces )
        	throws IOException, ClassNotFoundException {
 		
-		Class[] interfacesClass = new Class[interfaces.length];
+		Class<?>[] interfacesClass = new Class[interfaces.length];
 		for( int i=0; i< interfaces.length; i++ )
 		{
 			interfacesClass[i] = Class.forName(interfaces[i], false, cl);
Only in trunk/org/jboss/mx/server: PropertyAccess.java
diff -EbwBru 6.0.0.M1/org/jboss/mx/server/registry/BasicMBeanRegistry.java trunk/org/jboss/mx/server/registry/BasicMBeanRegistry.java
--- 6.0.0.M1/org/jboss/mx/server/registry/BasicMBeanRegistry.java	2009-11-30 14:38:47.000000000 -0600
+++ trunk/org/jboss/mx/server/registry/BasicMBeanRegistry.java	2009-12-10 12:42:44.000000000 -0600
@@ -26,6 +26,9 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Vector;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicLong;
+
 import javax.management.Descriptor;
 import javax.management.DynamicMBean;
 import javax.management.InstanceAlreadyExistsException;
@@ -49,9 +52,6 @@
 import javax.management.modelmbean.ModelMBeanInfo;
 import javax.management.modelmbean.RequiredModelMBean;
 
-import EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap;
-import EDU.oswego.cs.dl.util.concurrent.SynchronizedLong;
-
 import org.jboss.classloading.spi.RealClassLoader;
 import org.jboss.logging.Logger;
 import org.jboss.mx.loading.LoaderRepository;
@@ -84,8 +84,9 @@
  * @author  <a href="mailto:jhaynie@vocalocity.net">Jeff Haynie</a>.
  * @author  <a href="mailto:thomas.diesler@jboss.com">Thomas Diesler</a>.
  *
- * @version $Revision: 85294 $
+ * @version $Revision: 94665 $
  */
+@SuppressWarnings("unchecked")
 public class BasicMBeanRegistry
    implements MBeanRegistry
 {
@@ -104,7 +105,7 @@
     * key properties to registry entries.
     * domain -> canonicalKeyProperties -> MBeanEntry
     */
-   private Map domainMap = new ConcurrentReaderHashMap();
+   private Map domainMap = new ConcurrentHashMap();
 
    /**
     * The default domain for this registry
@@ -124,12 +125,12 @@
    /**
     * Sequence number for the MBean server registration notifications.
     */
-   protected final SynchronizedLong registrationNotificationSequence = new SynchronizedLong (1);
+   protected final AtomicLong registrationNotificationSequence = new AtomicLong (1);
 
    /**
     * Sequence number for the MBean server unregistration notifications.
     */
-   protected final SynchronizedLong unregistrationNotificationSequence = new SynchronizedLong (1);
+   protected final AtomicLong unregistrationNotificationSequence = new AtomicLong (1);
 
    /**
     * Direct reference to the mandatory MBean server delegate MBean.
@@ -152,6 +153,9 @@
 
    /**
     * Constructs a new BasicMBeanRegistry.<p>
+    * @param server 
+    * @param defaultDomain 
+    * @param clr 
     */
    public BasicMBeanRegistry(MBeanServer server, String defaultDomain, ClassLoaderRepository clr)
    {
@@ -186,17 +190,16 @@
          throw new RuntimeOperationsException(
                new IllegalArgumentException("Attempting to register null object"));
 
-      // get mbean type, dynamic or standard
-      MBeanCapability mbcap = MBeanCapability.of(object.getClass());
-
       try
       {
 
          if (valueMap != null)
             magicToken = (String) valueMap.get(JMI_DOMAIN);
 
+         // get mbean type, dynamic or standard
+         int mbeanType = MBeanCapability.of(object.getClass());
+
          // TODO: allow custom factory for diff invoker types
-         int mbeanType = mbcap.getMBeanType();
          if (mbeanType == MBeanCapability.STANDARD_MBEAN)
          {
             invoker = new XMBean(object, XMBeanConstants.STANDARD_MBEAN);
@@ -387,7 +390,7 @@
      */
     protected void sendRegistrationNotification (ObjectName regName)
     {
-        long sequence = registrationNotificationSequence.increment ();
+        long sequence = registrationNotificationSequence.incrementAndGet();
         delegate.sendNotification (
                 new MBeanServerNotification (
                         MBeanServerNotification.REGISTRATION_NOTIFICATION,
@@ -493,7 +496,7 @@
    */
   protected void sendUnRegistrationNotification (ObjectName name)
   {
-      long sequence = unregistrationNotificationSequence.increment ();
+      long sequence = unregistrationNotificationSequence.incrementAndGet();
 
       delegate.sendNotification (
               new MBeanServerNotification (
@@ -623,6 +626,19 @@
       // Now we have to do a brute force, oh well.
       else
       {
+         // We need to preprocess any implied DefaultDomain in the pattern since the apply() doesn't understand it
+         if (pattern.getDomain().length() == 0)
+         {
+            try
+            {
+               pattern = new ObjectName(defaultDomain + pattern.toString());
+            }
+            catch (MalformedObjectNameException e)
+            {
+               log.warn("Unable to add default domain '" + defaultDomain + "' to " + pattern);
+            }
+         }
+         
          // Here we go, step through every domain and see if our pattern matches before optionally checking
          // each ObjectName's properties for a match.
          for (Iterator domainIter = domainMap.entrySet().iterator(); domainIter.hasNext();)
@@ -853,6 +869,12 @@
    /**
     * Adds the given MBean Info object to the persistence queue if it explicity denotes
     * (via metadata) that it should be stored.
+    * @param info 
+    * @param name 
+    * @throws MalformedObjectNameException 
+    * @throws InstanceNotFoundException 
+    * @throws MBeanException 
+    * @throws ReflectionException 
     * @todo -- add notification of registration of MBeanInfoDb.
     *   It is possible that some MBeans whose MBean Info should be stored are
     *   registered before the MBean Info Storage delegate is available.  These
@@ -931,6 +953,7 @@
    /**
     * ObjectName objects bound to MBean Info objects that are waiting to be stored in the
     * persistence store.
+    * @return the store
     */
    protected Vector mbInfosToStore()
    {
@@ -956,7 +979,7 @@
       Map mbeanMap = (Map) domainMap.get(domain);
       if (mbeanMap == null && createIfMissing)
       {
-        mbeanMap = new ConcurrentReaderHashMap();
+        mbeanMap = new ConcurrentHashMap();
         domainMap.put(domain, mbeanMap);
       }
       return mbeanMap;
diff -EbwBru 6.0.0.M1/org/jboss/mx/server/registry/MBeanEntry.java trunk/org/jboss/mx/server/registry/MBeanEntry.java
--- 6.0.0.M1/org/jboss/mx/server/registry/MBeanEntry.java	2009-11-30 14:39:19.000000000 -0600
+++ trunk/org/jboss/mx/server/registry/MBeanEntry.java	2009-12-10 12:42:25.000000000 -0600
@@ -31,12 +31,10 @@
 /**
  * info@todo this docs
  *
- * @see org.jboss.mx.server.registry.MBeanRegistry
- * @see org.jboss.mx.server.MBeanServerImpl
- *
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  */
+@SuppressWarnings("unchecked")
 public class MBeanEntry
    implements ServerConstants
 {
@@ -172,7 +170,7 @@
    /**
     * Retrieve a value from the map.
     *
-    * @return key the key to value
+    * @param key the key to value
     * @return the value or null if there is no entry
     */
    public Object getValue(String key)
diff -EbwBru 6.0.0.M1/org/jboss/mx/server/registry/MbeanInfoDb.java trunk/org/jboss/mx/server/registry/MbeanInfoDb.java
--- 6.0.0.M1/org/jboss/mx/server/registry/MbeanInfoDb.java	2009-11-30 14:39:19.000000000 -0600
+++ trunk/org/jboss/mx/server/registry/MbeanInfoDb.java	2009-12-10 12:42:25.000000000 -0600
@@ -36,6 +36,7 @@
  * Persistence Interceptor.
  * @author Matt Munz
  */
+@SuppressWarnings("unchecked")
 public class MbeanInfoDb extends Object
 {
    protected Vector fMbInfosToStore;
@@ -58,6 +59,8 @@
    /**
     * ObjectName objects bound to MBean Info objects that are waiting to be stored in the 
     * persistence store.
+    * 
+    * @return the vector
     */
    protected Vector mbInfosToStore()
    {
diff -EbwBru 6.0.0.M1/org/jboss/mx/server/registry/MBeanRegistry.java trunk/org/jboss/mx/server/registry/MBeanRegistry.java
--- 6.0.0.M1/org/jboss/mx/server/registry/MBeanRegistry.java	2009-11-30 14:38:47.000000000 -0600
+++ trunk/org/jboss/mx/server/registry/MBeanRegistry.java	2009-12-10 12:42:44.000000000 -0600
@@ -31,6 +31,8 @@
 import javax.management.ObjectInstance;
 import javax.management.ObjectName;
 
+import org.jboss.mx.server.ServerConstants;
+
 /**
  * Implementations of this interface can be plugged into the MBeanServer,
  * to control the registration and deregistration of MBeans. <p>
@@ -43,7 +45,7 @@
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
  * @author  <a href="mailto:trevor@protocool.com">Trevor Squires</a>.
  * @author  <a href="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock</a>.
- * @version $Revision: 81022 $
+ * @version $Revision: 85671 $
  *
  * @see MBeanEntry
  */
@@ -86,6 +88,7 @@
     * @exception NotCompliantMBeanException when the passed object is
     *            a valid mbean.
     */
+   @SuppressWarnings("unchecked")
    ObjectInstance registerMBean(Object object, ObjectName name, Map valueMap)
       throws InstanceAlreadyExistsException, 
              MBeanRegistrationException, 
@@ -189,7 +192,8 @@
     * @param pattern the pattern to match
     * @return a List of entries matching the pattern
     */
-   public List findEntries(ObjectName pattern);
+   @SuppressWarnings("unchecked")
+   List findEntries(ObjectName pattern);
    
    /**
     * Retrieve the number of mbeans registered.<p>
diff -EbwBru 6.0.0.M1/org/jboss/mx/server/ServerConfig.java trunk/org/jboss/mx/server/ServerConfig.java
--- 6.0.0.M1/org/jboss/mx/server/ServerConfig.java	2009-11-30 14:31:24.000000000 -0600
+++ trunk/org/jboss/mx/server/ServerConfig.java	2009-12-10 12:42:44.000000000 -0600
@@ -24,7 +24,6 @@
 import javax.management.MBeanServerBuilder;
 import javax.management.ObjectName;
 
-import org.jboss.mx.standardmbean.StandardMBeanDelegateFactory;
 import org.jboss.mx.util.ObjectNameFactory;
 import org.jboss.util.Classes;
 
@@ -32,7 +31,7 @@
  * Server configuration.
  * 
  * @author  <a href="mailto:adrian@jboss.com">Adrian Brock</a>.
- * @version $Revision: 81019 $
+ * @version $Revision: 86129 $
  */
 public abstract class ServerConfig
 {
@@ -135,13 +134,6 @@
     */
    public abstract ObjectName getLoaderRepositoryName();
 
-   /**
-    * Get the standardmbean delegate factory
-    * 
-    * @return the factory
-    */
-   public abstract StandardMBeanDelegateFactory getStandardMBeanDelegateFactory();
-   
    // Protected ---------------------------------------------------
 
    protected abstract String getDefaultMBeanServerBuilderClassName();
diff -EbwBru 6.0.0.M1/org/jboss/mx/server/ServerConstants.java trunk/org/jboss/mx/server/ServerConstants.java
--- 6.0.0.M1/org/jboss/mx/server/ServerConstants.java	2009-11-30 14:31:24.000000000 -0600
+++ trunk/org/jboss/mx/server/ServerConstants.java	2009-12-10 12:42:25.000000000 -0600
@@ -27,12 +27,9 @@
  * Different JMX service specific constants should be added to the <tt>ServiceConstants</tt>
  * interface.
  *
- * @see org.jboss.mx.service.ServiceConstants
- * @see org.jboss.mx.server.MBeanServerImpl
- *
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
  * @author  <a href="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock</a>.
- * @version $Revision: 81019 $
+ * @version $Revision: 86129 $
  *   
  */
 public interface ServerConstants
@@ -95,12 +92,12 @@
    /**
     * The version of the implementation. This value can be retrieved from the MBean server delegate.
     */
-   final static String IMPLEMENTATION_VERSION             =  "4.0.0";
+   final static String IMPLEMENTATION_VERSION             =  "6.0";
    
    /**
     * The vendor of the implementation. This value can be retrieved from the MBean server delegate.
     */
-   final static String IMPLEMENTATION_VENDOR              = "JBoss Organization";
+   final static String IMPLEMENTATION_VENDOR              = "Red Hat Enterprise Middleware LLC";
    
    
    // System properties ---------------------------------------------
@@ -120,7 +117,7 @@
    /**
     * This constant defines the default Model MBean implementation used for spec
     * required Model MBean (<tt>javax.management.modelmbean.RequiredModelMBean</tt>)
-    * instance. Defaults to {@link org.jboss.mx.modelmbean.XMBean} implementation.
+    * instance. Defaults to org.jboss.mx.modelmbean.XMBean implementation.
     */
    final static String DEFAULT_REQUIRED_MODELMBEAN_CLASS  = "org.jboss.mx.modelmbean.XMBean";
    
diff -EbwBru 6.0.0.M1/org/jboss/mx/server/TCLAction.java trunk/org/jboss/mx/server/TCLAction.java
--- 6.0.0.M1/org/jboss/mx/server/TCLAction.java	2009-11-30 14:39:19.000000000 -0600
+++ trunk/org/jboss/mx/server/TCLAction.java	2009-12-10 12:42:25.000000000 -0600
@@ -26,7 +26,7 @@
 
 /**
  * @author <a href="mailto:alex@jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision: 81026 $</tt>
+ * @version <tt>$Revision: 85671 $</tt>
  */
 interface TCLAction
 {
@@ -83,9 +83,9 @@
 
    TCLAction PRIVILEGED = new TCLAction()
    {
-      private final PrivilegedAction getTCLPrivilegedAction = new PrivilegedAction()
+      private final PrivilegedAction<ClassLoader> getTCLPrivilegedAction = new PrivilegedAction<ClassLoader>()
       {
-         public Object run()
+         public ClassLoader run()
          {
             return Thread.currentThread().getContextClassLoader();
          }
@@ -93,14 +93,14 @@
 
       public ClassLoader getContextClassLoader()
       {
-         return (ClassLoader)AccessController.doPrivileged(getTCLPrivilegedAction);
+         return AccessController.doPrivileged(getTCLPrivilegedAction);
       }
 
       public ClassLoader getContextClassLoader(final Thread thread)
       {
-         return (ClassLoader)AccessController.doPrivileged(new PrivilegedAction()
+         return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
          {
-            public Object run()
+            public ClassLoader run()
             {
                return thread.getContextClassLoader();
             }
@@ -110,7 +110,7 @@
       public void setContextClassLoader(final ClassLoader cl)
       {
          AccessController.doPrivileged(
-            new PrivilegedAction()
+            new PrivilegedAction<Object>()
             {
                public Object run()
                {
@@ -124,7 +124,7 @@
       public void setContextClassLoader(final Thread thread, final ClassLoader cl)
       {
          AccessController.doPrivileged(
-            new PrivilegedAction()
+            new PrivilegedAction<Object>()
             {
                public Object run()
                {
diff -EbwBru 6.0.0.M1/org/jboss/mx/server/TimeoutException.java trunk/org/jboss/mx/server/TimeoutException.java
--- 6.0.0.M1/org/jboss/mx/server/TimeoutException.java	2009-11-30 14:39:19.000000000 -0600
+++ trunk/org/jboss/mx/server/TimeoutException.java	2009-12-10 12:42:26.000000000 -0600
@@ -23,12 +23,15 @@
 
 /**
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  *   
  */
 public class TimeoutException
    extends Exception
 {
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -5392945073280632822L;
+
    public TimeoutException()
    {
       super();
Only in 6.0.0.M1/org/jboss/mx: standardmbean
Only in 6.0.0.M1/org/jboss/mx: timer
Only in 6.0.0.M1/org/jboss/mx/util: AgentID.java
diff -EbwBru 6.0.0.M1/org/jboss/mx/util/JBossNotCompliantMBeanException.java trunk/org/jboss/mx/util/JBossNotCompliantMBeanException.java
--- 6.0.0.M1/org/jboss/mx/util/JBossNotCompliantMBeanException.java	2009-11-30 14:39:20.000000000 -0600
+++ trunk/org/jboss/mx/util/JBossNotCompliantMBeanException.java	2009-12-10 12:42:26.000000000 -0600
@@ -37,13 +37,15 @@
  * Created: Tues Feb  18 22:45:03 2003
  *
  * @author <a href="mailto:d_jencks@users.sourceforge.net">David Jencks</a>
- * @version $Revision: 81026 $
+ * @version $Revision: 85671 $
  */
 
 public class JBossNotCompliantMBeanException
    extends NotCompliantMBeanException
            //implements NestedThrowable
 {
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 7441880585611238427L;
 
    private final Throwable t;
 
diff -EbwBru 6.0.0.M1/org/jboss/mx/util/JBossNotificationBroadcasterSupport.java trunk/org/jboss/mx/util/JBossNotificationBroadcasterSupport.java
--- 6.0.0.M1/org/jboss/mx/util/JBossNotificationBroadcasterSupport.java	2009-11-30 14:31:27.000000000 -0600
+++ trunk/org/jboss/mx/util/JBossNotificationBroadcasterSupport.java	2009-12-10 12:42:21.000000000 -0600
@@ -21,6 +21,8 @@
  */
 package org.jboss.mx.util;
 
+import java.util.concurrent.atomic.AtomicLong;
+
 import javax.management.JMException;
 import javax.management.ListenerNotFoundException;
 import javax.management.MBeanNotificationInfo;
@@ -33,14 +35,12 @@
 import org.jboss.mx.notification.ListenerRegistration;
 import org.jboss.mx.notification.ListenerRegistry;
 
-import EDU.oswego.cs.dl.util.concurrent.SynchronizedLong;
-
 /**
  * A helper class for notification broadcasters/emitters
  *
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
  * @author  <a href="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock</a>.
- * @version $Revision: 81019 $
+ * @version $Revision: 85671 $
  */
 public class JBossNotificationBroadcasterSupport implements NotificationEmitter
 {
@@ -54,7 +54,7 @@
    private ListenerRegistry registry = new ListenerRegistry();
    
    /** Sequence number for jmx notifications we send out */ 
-   private SynchronizedLong sequenceNumber = new SynchronizedLong(0);   
+   private AtomicLong sequenceNumber = new AtomicLong(0);   
 
    /**
     * Construct the new notification broadcaster support object
@@ -140,6 +140,6 @@
     */
    public long nextNotificationSequenceNumber()
    {
-      return sequenceNumber.increment();
+      return sequenceNumber.incrementAndGet();
    }   
 }
diff -EbwBru 6.0.0.M1/org/jboss/mx/util/JBossNotificationFilterSupport.java trunk/org/jboss/mx/util/JBossNotificationFilterSupport.java
--- 6.0.0.M1/org/jboss/mx/util/JBossNotificationFilterSupport.java	2009-11-30 14:31:27.000000000 -0600
+++ trunk/org/jboss/mx/util/JBossNotificationFilterSupport.java	2009-12-10 12:42:21.000000000 -0600
@@ -22,7 +22,6 @@
 package org.jboss.mx.util;
 
 import java.io.Serializable;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Vector;
 
@@ -48,7 +47,7 @@
  * be done with it.
  *  
  * @author  <a href="mailto:dimitris@jboss.org">Dimitris Andreadis</a>.
- * @version $Revision: 81019 $
+ * @version $Revision: 85671 $
  * @since 4.0.3
  */
 public class JBossNotificationFilterSupport
@@ -63,7 +62,7 @@
    /**
     * Enabled notification types.
     */
-   private List enabledTypes;
+   private List<String> enabledTypes;
 
    // Static ------------------------------------------------------
 
@@ -135,6 +134,7 @@
     *
     * @return the vector of enabled types.
     */
+   @SuppressWarnings("unchecked")
    public Vector getEnabledTypes()
    {
       return new Vector(enabledTypes);
@@ -170,9 +170,8 @@
       }
       // Check if it is enabled
       String notificationType = notification.getType();
-      for (Iterator i = enabledTypes.iterator(); i.hasNext(); )
+      for (String type : enabledTypes)
       {
-         String type = (String)i.next();
          if (notificationType.startsWith(type))
          {
             return true;
diff -EbwBru 6.0.0.M1/org/jboss/mx/util/JMXExceptionDecoder.java trunk/org/jboss/mx/util/JMXExceptionDecoder.java
--- 6.0.0.M1/org/jboss/mx/util/JMXExceptionDecoder.java	2009-11-30 14:31:27.000000000 -0600
+++ trunk/org/jboss/mx/util/JMXExceptionDecoder.java	2009-12-10 12:42:21.000000000 -0600
@@ -28,7 +28,7 @@
  * JMX exceptions.
  *      
  * @author <a href="mailto:jason@planet57.com">Jason Dillon</a>
- * @version $Revision: 81019 $
+ * @version $Revision: 85671 $
  */
 public class JMXExceptionDecoder
 {
@@ -36,6 +36,9 @@
     * Attempt to decode the given Throwable.  If it
     * is a container JMX exception, then the target
     * is returned.  Otherwise the argument is returned.
+    * 
+    * @param t the initial throwable
+    * @return Throwable always
     */
    public static Throwable decode(final Throwable t)
    {
@@ -87,6 +90,9 @@
     * Decode and rethrow the given Throwable.  If it
     * is a container JMX exception, then the target
     * is thrown.  Otherwise the argument is thrown.
+    * 
+    * @param e the excetion to rethrow
+    * @throws Exception the decoded exception
     */
    public static void rethrow(final Exception e)
       throws Exception
diff -EbwBru 6.0.0.M1/org/jboss/mx/util/JMXInvocationHandler.java trunk/org/jboss/mx/util/JMXInvocationHandler.java
--- 6.0.0.M1/org/jboss/mx/util/JMXInvocationHandler.java	2009-11-30 14:31:27.000000000 -0600
+++ trunk/org/jboss/mx/util/JMXInvocationHandler.java	2009-12-10 12:42:21.000000000 -0600
@@ -51,7 +51,7 @@
  * Invocation handler for MBean proxies.
  *
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
- * @version $Revision: 81019 $
+ * @version $Revision: 86129 $
  *   
  */
 public class JMXInvocationHandler 
@@ -79,7 +79,7 @@
    /**
     * MBean attribute meta data.
     */
-   private HashMap attributeMap          = new HashMap();
+   private HashMap<String, MBeanAttributeInfo> attributeMap = new HashMap<String, MBeanAttributeInfo>();
    
    /**
     * Indicates whether Object.toString() should be delegated to the resource
@@ -178,7 +178,7 @@
    public Object invoke(Object proxy, Method method, Object[] args) 
       throws Exception
    {
-      Class declaringClass = method.getDeclaringClass();
+      Class<?> declaringClass = method.getDeclaringClass();
       
       // Handle methods from Object class. If the target resource exposes 
       // operation metadata with same signature then the invocations will be
@@ -214,7 +214,7 @@
             String attrName = methodName.substring(3, methodName.length());
             
             // check that the metadata exists
-            MBeanAttributeInfo info = (MBeanAttributeInfo)attributeMap.get(attrName);
+            MBeanAttributeInfo info = attributeMap.get(attrName);
             if (info != null)
             {
                String retType  = method.getReturnType().getName();
@@ -233,10 +233,10 @@
             String attrName = methodName.substring(2, methodName.length());
             
             // check that the metadata exists
-            MBeanAttributeInfo info = (MBeanAttributeInfo)attributeMap.get(attrName);
+            MBeanAttributeInfo info = attributeMap.get(attrName);
             if (info != null && info.isIs())
             {
-               Class retType = method.getReturnType();
+               Class<?> retType = method.getReturnType();
                
                // check for correct return type on the getter
                if (retType.equals(Boolean.class) || retType.equals(Boolean.TYPE))
@@ -252,12 +252,12 @@
             String attrName = methodName.substring(3, methodName.length());
             
             // check that the metadata exists
-            MBeanAttributeInfo info = (MBeanAttributeInfo)attributeMap.get(attrName);
+            MBeanAttributeInfo info = attributeMap.get(attrName);
             if (info != null && method.getReturnType().equals(Void.TYPE))
             {
                ClassLoader cl = Thread.currentThread().getContextClassLoader();
                
-               Class signatureClass = null;
+               Class<?> signatureClass = null;
                String classType     = info.getType();
                
                if (isPrimitive(classType))
@@ -278,7 +278,7 @@
          if (args != null)
          {
             signature = new String[args.length];
-            Class[] sign = method.getParameterTypes();
+            Class<?>[] sign = method.getParameterTypes();
             
             for (int i = 0; i < sign.length; ++i)
                signature[i] = sign[i].getName();
@@ -353,7 +353,7 @@
    
    public String toString() 
    {
-      return "MBeanProxy for " + objectName + " (Agent ID: " + AgentID.get(server) + ")";
+      return "MBeanProxy for " + objectName;
    }
    
    
@@ -443,7 +443,7 @@
       return false;
    }
 
-   private Class getPrimitiveClass(String type)
+   private Class<?> getPrimitiveClass(String type)
    {
       if (type.equals(Integer.TYPE.getName()))  return Integer.TYPE;
       if (type.equals(Long.TYPE.getName()))     return Long.TYPE;
Only in 6.0.0.M1/org/jboss/mx/util: MBeanInstaller.java
diff -EbwBru 6.0.0.M1/org/jboss/mx/util/MBeanProxyExt.java trunk/org/jboss/mx/util/MBeanProxyExt.java
--- 6.0.0.M1/org/jboss/mx/util/MBeanProxyExt.java	2009-11-30 14:31:27.000000000 -0600
+++ trunk/org/jboss/mx/util/MBeanProxyExt.java	2009-12-10 12:42:21.000000000 -0600
@@ -49,7 +49,7 @@
  * @author <a href="mailto:jason@planet57.com">Jason Dillon</a>.
  * @author <a href="mailto:adrian.brock@happeningtimes.com">Adrian Brock</a>.
  * @author <a href="mailto:dimitris@jboss.org">Dimitris Andreadis</a>.
- * @version <tt>$Revision: 81019 $</tt>
+ * @version <tt>$Revision: 85671 $</tt>
  */
 public class MBeanProxyExt
    implements InvocationHandler, MBeanProxyInstance, Externalizable
@@ -75,7 +75,7 @@
    /**
     * The MBean's attributes
     */
-   private transient final HashMap attributeMap = new HashMap();
+   private transient final HashMap<String, MBeanAttributeInfo> attributeMap = new HashMap<String, MBeanAttributeInfo>();
    /**
     * Have the attributes been retrieved
     */
@@ -114,7 +114,7 @@
       throws Throwable
    {
       // if the method belongs to ProxyInstance, then invoke locally
-      Class type = method.getDeclaringClass();
+      Class<?> type = method.getDeclaringClass();
       if (type == MBeanProxyInstance.class || type == Object.class)
       {
          return method.invoke(this, args);
@@ -129,7 +129,7 @@
             init();
 
          String attrName = methodName.substring(3);
-         MBeanAttributeInfo info = (MBeanAttributeInfo) attributeMap.get(attrName);
+         MBeanAttributeInfo info = attributeMap.get(attrName);
          if (info != null)
          {
             String retType = method.getReturnType().getName();
@@ -154,10 +154,10 @@
             init();
 
          String attrName = methodName.substring(2);
-         MBeanAttributeInfo info = (MBeanAttributeInfo) attributeMap.get(attrName);
+         MBeanAttributeInfo info = attributeMap.get(attrName);
          if (info != null && info.isIs())
          {
-            Class retType = method.getReturnType();
+            Class<?> retType = method.getReturnType();
             if (retType.equals(Boolean.class) || retType.equals(Boolean.TYPE))
             {
                try
@@ -179,7 +179,7 @@
             init();
 
          String attrName = methodName.substring(3);
-         MBeanAttributeInfo info = (MBeanAttributeInfo) attributeMap.get(attrName);
+         MBeanAttributeInfo info = attributeMap.get(attrName);
          if (info != null && method.getReturnType() == Void.TYPE)
          {
             try
@@ -197,7 +197,7 @@
       // Operation
 
       // convert the parameter types to strings for JMX
-      Class[] types = method.getParameterTypes();
+      Class<?>[] types = method.getParameterTypes();
       String[] sig = new String[types.length];
       for (int i = 0; i < types.length; i++)
       {
@@ -300,7 +300,7 @@
     * @throws javax.management.MalformedObjectNameException Invalid object
     * name.
     */
-   public static Object create(final Class intf, final String name)
+   public static Object create(final Class<?> intf, final String name)
       throws MalformedObjectNameException
    {
       return create(intf, new ObjectName(name));
@@ -316,7 +316,7 @@
     * @throws javax.management.MalformedObjectNameException Invalid object
     * name.
     */
-   public static Object create(final Class intf,
+   public static Object create(final Class<?> intf,
       final String name,
       final MBeanServer server)
       throws MalformedObjectNameException
@@ -330,7 +330,7 @@
     * @param name The name of the MBean to proxy invocations to.
     * @return A MBean proxy.
     */
-   public static Object create(final Class intf, final ObjectName name)
+   public static Object create(final Class<?> intf, final ObjectName name)
    {
       return create(intf, name, MBeanServerLocator.locateJBoss());
    }
@@ -342,7 +342,7 @@
     * @param server The MBeanServer that contains the MBean to proxy to.
     * @return A MBean proxy.
     */
-   public static Object create(final Class intf,
+   public static Object create(final Class<?> intf,
       final ObjectName name,
       final MBeanServer server)
    {
@@ -358,17 +358,17 @@
     *    be retrieved when the proxy is created.
     * @return A MBean proxy.
     */
-   public static Object create(final Class intf, final ObjectName name,
+   public static Object create(final Class<?> intf, final ObjectName name,
       final MBeanServer server, boolean lazyInit)
    {
       // CL which delegates to MBeanProxyInstance's cl for it's class resolution
-      PrivilegedAction action = new PrivilegedAction()
+      PrivilegedAction<ClassLoader> action = new PrivilegedAction<ClassLoader>()
       {
-         public Object run()
+         public ClassLoader run()
          {
             ClassLoader cl = new ClassLoader(intf.getClassLoader())
             {
-               public Class loadClass(final String className) throws ClassNotFoundException
+               public Class<?> loadClass(final String className) throws ClassNotFoundException
                {
                   try
                   {
@@ -389,8 +389,8 @@
             return cl;
          }
       };
-      ClassLoader cl = (ClassLoader) AccessController.doPrivileged(action);
-      Class[] ifaces = {MBeanProxyInstance.class, intf};
+      ClassLoader cl = AccessController.doPrivileged(action);
+      Class<?>[] ifaces = {MBeanProxyInstance.class, intf};
       InvocationHandler handler = new MBeanProxyExt(name, server, lazyInit);
       return Proxy.newProxyInstance(cl, ifaces, handler);
    }
diff -EbwBru 6.0.0.M1/org/jboss/mx/util/MBeanProxy.java trunk/org/jboss/mx/util/MBeanProxy.java
--- 6.0.0.M1/org/jboss/mx/util/MBeanProxy.java	2009-11-30 14:31:27.000000000 -0600
+++ trunk/org/jboss/mx/util/MBeanProxy.java	2009-12-10 12:42:21.000000000 -0600
@@ -38,7 +38,7 @@
  * @see java.lang.reflect.Proxy
  *
  * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
- * @version $Revision: 81019 $
+ * @version $Revision: 85671 $
  *   
  */
 public class MBeanProxy
@@ -57,7 +57,7 @@
     *
     * @throws MBeanProxyCreationException if the proxy could not be created
     */
-   public static Object get(Class intrface, ObjectName name, String agentID) throws MBeanProxyCreationException
+   public static Object get(Class<?> intrface, ObjectName name, String agentID) throws MBeanProxyCreationException
    {
       return get(intrface, name, (MBeanServer)MBeanServerFactory.findMBeanServer(agentID).get(0));
    }
@@ -73,19 +73,17 @@
     *
     * @throws MBeanProxyCreationException if the proxy could not be created
     */
-   public static Object get(Class intrface, ObjectName name, MBeanServer server)  throws MBeanProxyCreationException
+   public static Object get(Class<?> intrface, ObjectName name, MBeanServer server)  throws MBeanProxyCreationException
    {
       return get(new Class[] { intrface, ProxyContext.class, DynamicMBean.class }, name, server);
    }
 
-   /**
-    */
    public static Object get(ObjectName name, MBeanServer server)  throws MBeanProxyCreationException
    {
       return get(new Class[] { ProxyContext.class, DynamicMBean.class }, name, server);
    }
 
-   private static Object get(Class[] interfaces, ObjectName name, MBeanServer server) throws MBeanProxyCreationException
+   private static Object get(Class<?>[] interfaces, ObjectName name, MBeanServer server) throws MBeanProxyCreationException
    {
       return Proxy.newProxyInstance(
             Thread.currentThread().getContextClassLoader(),
@@ -105,7 +103,7 @@
     *
     * @throws MBeanProxyCreationException if the proxy could not be created
     */
-   public static Object create(Class instance, Class intrface, ObjectName name, String agentID) throws MBeanProxyCreationException
+   public static Object create(Class<?> instance, Class<?> intrface, ObjectName name, String agentID) throws MBeanProxyCreationException
    {
       return create(instance, intrface, name, (MBeanServer)MBeanServerFactory.findMBeanServer(agentID).get(0));
    }   
@@ -117,10 +115,11 @@
     * @param   intrface the interface this proxy implements
     * @param   name     object name of the MBean
     * @param   server   MBean server this proxy connects to
+    * @return  the proxy
     *
     * @throws MBeanProxyCreationException if the proxy could not be created
     */
-   public static Object create(Class instance, Class intrface, ObjectName name, MBeanServer server) throws MBeanProxyCreationException
+   public static Object create(Class<?> instance, Class<?> intrface, ObjectName name, MBeanServer server) throws MBeanProxyCreationException
    {
       try
       {
diff -EbwBru 6.0.0.M1/org/jboss/mx/util/MBeanServerLocator.java trunk/org/jboss/mx/util/MBeanServerLocator.java
--- 6.0.0.M1/org/jboss/mx/util/MBeanServerLocator.java	2009-11-30 14:31:27.000000000 -0600
+++ trunk/org/jboss/mx/util/MBeanServerLocator.java	2009-12-10 12:42:21.000000000 -0600
@@ -25,6 +25,7 @@
 
 import javax.management.MBeanServer;
 import javax.management.MBeanServerFactory;
+import javax.management.ObjectName;
 
 /**
  * A helper class to locate an MBeanServer.
@@ -38,7 +39,7 @@
  * @author <a href="mailto:jason@planet57.com">Jason Dillon</a>
  * @author Scott.Stark@jboss.org
  * @author <a href="mailto:dimitris@jboss.org">Dimitris Andreadis</a> 
- * @version $Revision: 81019 $
+ * @version $Revision: 86129 $
  */
 public class MBeanServerLocator
 {
@@ -102,6 +103,7 @@
     * @return the main jboss MBeanServer
     * @throws IllegalStateException when no MBeanServer can be found
     */
+   @SuppressWarnings("unchecked")
    public static MBeanServer locateJBoss()
    {
       synchronized (MBeanServerLocator.class)
@@ -111,9 +113,9 @@
             return instance;
          }
       }      
-      for (Iterator i = MBeanServerFactory.findMBeanServer(null).iterator(); i.hasNext(); )
+      for (Iterator<MBeanServer> i = MBeanServerFactory.findMBeanServer(null).iterator(); i.hasNext(); )
       {
-         MBeanServer server = (MBeanServer) i.next();
+         MBeanServer server = i.next();
          if (server.getDefaultDomain().equals("jboss"))
          {
             return server;
@@ -121,4 +123,25 @@
       }
       throw new IllegalStateException("No 'jboss' MBeanServer found!");
    }   
+
+   /**
+    * Returns the agent identifier string of a given MBean server instance.
+    *
+    * @param server the MBeanServer
+    * @return <tt>MBeanServerId</tt> attribute of the MBean server delegate.
+    */
+   public static String getId(MBeanServer server)
+   {
+      try 
+      {
+         ObjectName name = ObjectName.getInstance("JMImplementation:type=MBeanServerDelegate");
+         String agentID = (String)server.getAttribute(name, "MBeanServerId");   
+      
+         return agentID;
+      }
+      catch (Throwable t)
+      {
+         throw new Error("Cannot find the MBean server delegate: " + t.toString());
+      }
+   }
 }
diff -EbwBru 6.0.0.M1/org/jboss/mx/util/MBeanTyperInvoker.java trunk/org/jboss/mx/util/MBeanTyperInvoker.java
--- 6.0.0.M1/org/jboss/mx/util/MBeanTyperInvoker.java	2009-11-30 14:38:49.000000000 -0600
+++ trunk/org/jboss/mx/util/MBeanTyperInvoker.java	2009-12-10 12:42:47.000000000 -0600
@@ -21,7 +21,6 @@
  */
 package org.jboss.mx.util;
 
-import javax.management.*;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.lang.reflect.UndeclaredThrowableException;
@@ -29,12 +28,17 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import javax.management.MBeanException;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
 /**
  * MBeanTyperInvoker handles method invocations against the MBeanTyper target object
  * and forwards them to the MBeanServer and ObjectName for invocation.
  *
  * @author <a href="mailto:jhaynie@vocalocity.net">Jeff Haynie</a>
  */
+@SuppressWarnings("unchecked")
 final class MBeanTyperInvoker implements java.lang.reflect.InvocationHandler
 {
     private final MBeanServer server;
diff -EbwBru 6.0.0.M1/org/jboss/mx/util/MBeanTyper.java trunk/org/jboss/mx/util/MBeanTyper.java
--- 6.0.0.M1/org/jboss/mx/util/MBeanTyper.java	2009-11-30 14:38:49.000000000 -0600
+++ trunk/org/jboss/mx/util/MBeanTyper.java	2009-12-10 12:42:47.000000000 -0600
@@ -42,12 +42,18 @@
  *
  * @author <a href="mailto:jhaynie@vocalocity.net">Jeff Haynie</a>
  */
+@SuppressWarnings("unchecked")
 public class MBeanTyper
 {
     static final boolean DEBUG = Boolean.getBoolean("jboss.jmx.debug");
 
     /**
      * create a typed object from an mbean
+    * @param server 
+    * @param mbean 
+    * @param mainInterface 
+    * @return the object
+    * @throws Exception 
      */
     public static final Object typeMBean(MBeanServer server, ObjectName mbean, Class mainInterface)
             throws Exception
diff -EbwBru 6.0.0.M1/org/jboss/mx/util/MetaDataUtil.java trunk/org/jboss/mx/util/MetaDataUtil.java
--- 6.0.0.M1/org/jboss/mx/util/MetaDataUtil.java	2009-11-30 14:31:27.000000000 -0600
+++ trunk/org/jboss/mx/util/MetaDataUtil.java	2009-12-10 12:42:21.000000000 -0600
@@ -31,7 +31,7 @@
  * @author  <a href="mailto:jason@planet57.com">Jason Dillon</a>
  * @author <a href="Scott.Stark@jboss.org">Scott Stark</a>
  * @author  <a href="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock</a>
- * @version $Revision: 81019 $
+ * @version $Revision: 85671 $
  */
 public final class MetaDataUtil
 {
@@ -47,7 +47,7 @@
    public static final String SHORT_TYPE_NAME = Short.TYPE.getName();
    public static final String VOID_TYPE_NAME = Void.TYPE.getName();
 
-   private static final HashSet reserved = new HashSet();
+   private static final HashSet<String> reserved = new HashSet<String>();
 
    static
    {
@@ -204,7 +204,7 @@
     *
     * Null is returned when the array declaration is invalid.
     *
-    * @param string the string to test
+    * @param className the string to test
     * @return the underlying class name or null
     */
    public static String getBaseClassName(String className)
Only in 6.0.0.M1/org/jboss/mx/util: MonitorCallback.java
Only in 6.0.0.M1/org/jboss/mx/util: MonitorRunnable.java
diff -EbwBru 6.0.0.M1/org/jboss/mx/util/ObjectNameConverter.java trunk/org/jboss/mx/util/ObjectNameConverter.java
--- 6.0.0.M1/org/jboss/mx/util/ObjectNameConverter.java	2009-11-30 14:31:27.000000000 -0600
+++ trunk/org/jboss/mx/util/ObjectNameConverter.java	2009-12-10 12:42:21.000000000 -0600
@@ -48,7 +48,7 @@
  *
  * @author <a href="mailto:andreas@jboss.org">Andreas Schaefer</a>
  * @author <a href="mailto:william.hoyle@jungledrum.co.nz">William Hoyle</a>
- * @version $Revision: 81019 $
+ * @version $Revision: 85671 $
  */
 public class ObjectNameConverter
 {
@@ -99,13 +99,14 @@
     * Check the keys and values of the properties and convert invalid characters
     *
     * @param pDomainName Name of the Domain
-    * @param pProperites Hashtable containing the properties of the Object Name
+    * @param pProperties Hashtable containing the properties of the Object Name
     *
     * @return Created Object Name with the converted keays and values
     *
     * @throws javax.management.MalformedObjectNameException If the given Object Name
     *         is not correct
     **/
+   @SuppressWarnings("unchecked")
    public static ObjectName convert( String pDomainName, Hashtable pProperties )
       throws MalformedObjectNameException
    {
@@ -128,6 +129,7 @@
     *         and will contain a "*" as key if the given object
     *         name is a property pattern for queries.
     **/
+   @SuppressWarnings("unchecked")
    public static Hashtable getProperties( ObjectName pObjectName )
    {
       Hashtable lReturn = reverseProperties( pObjectName.getKeyPropertyList() );
@@ -296,6 +298,7 @@
     * detects property patterns
     *
     */
+   @SuppressWarnings("unchecked")
    private static ObjectName createObjectName(String domain, String properties) throws MalformedObjectNameException
    {
       if (null == properties || properties.length() < 1)
@@ -355,6 +358,7 @@
     *
     * precomputes the hashcode
     */
+   @SuppressWarnings("unchecked")
    private static ObjectName createObjectName(String domain, Hashtable properties, boolean pPattern) throws MalformedObjectNameException
    {
       if (null == properties || (!pPattern && properties.size() < 1))
@@ -398,6 +402,7 @@
       return result;
    }
    
+   @SuppressWarnings("unchecked")
    private static Hashtable reverseProperties( Hashtable pProperties ) {
       Hashtable lReturn = new Hashtable( pProperties.size() );
       Iterator i = pProperties.keySet().iterator();
@@ -411,6 +416,7 @@
       return lReturn;
    }
    
+   @SuppressWarnings("unchecked")
    private static String reverseString( Hashtable pProperties ) {
       StringBuffer lReturn = new StringBuffer();
       Iterator i = pProperties.keySet().iterator();
diff -EbwBru 6.0.0.M1/org/jboss/mx/util/ObjectNameFactory.java trunk/org/jboss/mx/util/ObjectNameFactory.java
--- 6.0.0.M1/org/jboss/mx/util/ObjectNameFactory.java	2009-11-30 14:31:27.000000000 -0600
+++ trunk/org/jboss/mx/util/ObjectNameFactory.java	2009-12-10 12:42:21.000000000 -0600
@@ -37,7 +37,7 @@
  * interface.
  *      
  * @author <a href="mailto:jason@planet57.com">Jason Dillon</a>
- * @version $Revision: 81019 $
+ * @version $Revision: 85671 $
  */
 public class ObjectNameFactory
 {
@@ -65,6 +65,7 @@
       }
    }
 
+   @SuppressWarnings("unchecked")
    public static ObjectName create(String domain, Hashtable table)
    {
       try
diff -EbwBru 6.0.0.M1/org/jboss/mx/util/ObjectNameMatch.java trunk/org/jboss/mx/util/ObjectNameMatch.java
--- 6.0.0.M1/org/jboss/mx/util/ObjectNameMatch.java	2009-11-30 14:31:27.000000000 -0600
+++ trunk/org/jboss/mx/util/ObjectNameMatch.java	2009-12-10 12:42:21.000000000 -0600
@@ -31,7 +31,7 @@
 /** JMX ObjectName comparision utility methods
  *
  * @author Scott.Stark@jboss.org
- * @version $Revision: 81019 $
+ * @version $Revision: 85671 $
  */
 public class ObjectNameMatch
 {
@@ -41,6 +41,7 @@
     * @param n1 An ObjectName or pattern
     * @return true if n0 and n1 match, false otherwise
     */
+   @SuppressWarnings("unchecked")
    public static boolean match(ObjectName n0, ObjectName n1)
    {
       boolean match = n0.equals(n1);
diff -EbwBru 6.0.0.M1/org/jboss/mx/util/ObjectNamePatternHelper.java trunk/org/jboss/mx/util/ObjectNamePatternHelper.java
--- 6.0.0.M1/org/jboss/mx/util/ObjectNamePatternHelper.java	2009-11-30 14:31:27.000000000 -0600
+++ trunk/org/jboss/mx/util/ObjectNamePatternHelper.java	2009-12-10 12:42:21.000000000 -0600
@@ -36,7 +36,7 @@
  *
  * @author  <a href="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock</a>.
  * @author  <a href="mailto:trevor@protocool.com">Trevor Squires</a>.
- * @version $Revision: 81019 $
+ * @version $Revision: 85671 $
  */
 public class ObjectNamePatternHelper
 {
@@ -47,6 +47,7 @@
     *
     * @param test the string to test
     * @param pattern the pattern to match
+    * @return true on a match
     */
    public static boolean patternMatch(ObjectName test, ObjectName pattern)
    {
@@ -66,6 +67,7 @@
     *
     * @param test the string to test
     * @param pattern the pattern to match
+    * @return true on a match
     */
    public static boolean patternMatch(String test, String pattern)
    {
@@ -86,6 +88,7 @@
     * @param tpos the start of the test string
     * @param pattern the pattern to match
     * @param ppos the start of the pattern string
+    * @return true on a match
     */
    public static boolean patternMatch(char[] test, int tpos, char[] pattern, int ppos)
    {
@@ -157,6 +160,7 @@
        *
        * @param pattern the object name that might be a pattern
        */
+      @SuppressWarnings("unchecked")
       public PropertyPattern(ObjectName pattern)
       {
          isPropertyPattern = pattern.isPropertyPattern();
@@ -183,7 +187,9 @@
        * Test whether the object name matches the pattern
        *
        * @param name the name to test
+       * @return true on a match
        */
+      @SuppressWarnings("unchecked")
       public boolean patternMatch(ObjectName name)
       {
          if (isPropertyPattern)
Only in 6.0.0.M1/org/jboss/mx/util: ObservedObject.java
diff -EbwBru 6.0.0.M1/org/jboss/mx/util/PropertyAccess.java trunk/org/jboss/mx/util/PropertyAccess.java
--- 6.0.0.M1/org/jboss/mx/util/PropertyAccess.java	2009-11-30 14:31:27.000000000 -0600
+++ trunk/org/jboss/mx/util/PropertyAccess.java	2009-12-10 12:42:21.000000000 -0600
@@ -30,11 +30,11 @@
  * permissions should not dictate whether or not access is allowed.
  *
  * @author Scott.Stark@jboss.org
- * @version $Revision: 81019 $
+ * @version $Revision: 86129 $
  */
-public class PropertyAccess
+class PropertyAccess
 {
-   static class PropertyReadAction implements PrivilegedAction
+   static class PropertyReadAction implements PrivilegedAction<String>
    {
       private String name;
       private String defaultValue;
@@ -43,12 +43,12 @@
          this.name = name;
          this.defaultValue = defaultValue;
       }
-      public Object run()
+      public String run()
       {
          return System.getProperty(name, defaultValue);
       }
    }
-   static class PropertyWriteAction implements PrivilegedAction
+   static class PropertyWriteAction implements PrivilegedAction<String>
    {
       private String name;
       private String value;
@@ -57,7 +57,7 @@
          this.name = name;
          this.value = value;
       }
-      public Object run()
+      public String run()
       {
          return System.setProperty(name, value);
       }
@@ -70,15 +70,15 @@
 
    public static String getProperty(String name, String defaultValue)
    {
-      PrivilegedAction action = new PropertyReadAction(name, defaultValue);
-      String property = (String) AccessController.doPrivileged(action);
+      PropertyReadAction action = new PropertyReadAction(name, defaultValue);
+      String property = AccessController.doPrivileged(action);
       return property;
    }
 
    public static String setProperty(String name, String value)
    {
-      PrivilegedAction action = new PropertyWriteAction(name, value);
-      String property = (String) AccessController.doPrivileged(action);
+      PropertyWriteAction action = new PropertyWriteAction(name, value);
+      String property = AccessController.doPrivileged(action);
       return property;
    }
    
Only in 6.0.0.M1/org/jboss/mx/util: QueryExpSupport.java
Only in 6.0.0.M1/org/jboss/mx/util: RunnableScheduler.java
Only in 6.0.0.M1/org/jboss/mx/util: SchedulableRunnable.java
Only in 6.0.0.M1/org/jboss/mx/util: Serialization.java
diff -EbwBru 6.0.0.M1/org/jboss/mx/util/TimeFormat.java trunk/org/jboss/mx/util/TimeFormat.java
--- 6.0.0.M1/org/jboss/mx/util/TimeFormat.java	2009-11-30 14:38:49.000000000 -0600
+++ trunk/org/jboss/mx/util/TimeFormat.java	2009-12-10 12:42:47.000000000 -0600
@@ -39,11 +39,14 @@
  * FIXME: expanded features need documentation. JGH
  *
  * @author <a href="mailto:jhaynie@vocalocity.net">Jeff Haynie</a>
- * @date   $Date: 2008-11-14 06:45:28 -0600 (Fri, 14 Nov 2008) $
- * @version $Revision: 81022 $
+ * @date   $Date: 2009-03-10 06:05:10 -0500 (Tue, 10 Mar 2009) $
+ * @version $Revision: 85671 $
  */
 public final class TimeFormat implements Serializable
 {
+    /** The serialVersionUID */
+   private static final long serialVersionUID = -2292807210697968506L;
+
     public static final boolean DEBUG = false;
 
     public static final long ONE_MILLISECOND = (1);
@@ -250,7 +253,7 @@
     }
 
     /**
-     * get the milliseconds
+     * @return the milliseconds
      */
     public long getMilliseconds()
     {
@@ -267,6 +270,7 @@
 
     /**
      * set rounding - one of ROUND_TO_MILLISECONDS, etc.
+    * @param r 
      */
     public void setRounding(int r)
     {
@@ -274,7 +278,7 @@
     }
 
     /**
-     * return the rounding
+     * @return the rounding
      */
     public int getRouding()
     {
@@ -283,6 +287,8 @@
 
     /**
      * format string based on rouding
+    * @param round 
+    * @return the formatted string
      */
     public String format(int round)
     {
@@ -434,7 +440,6 @@
      * rounding to <code>round</code>
      *
      * @param t
-     * @param round
      * @return String value
      */
     public static String valueOf(long t)
@@ -444,6 +449,9 @@
 
     /**
      * format with a date time
+    * @param format 
+    * @param time 
+    * @return the string
      */
     public static String format(String format, long time)
     {
