[jboss-cvs] JBossAS SVN: r95321 - projects/jboss-man/branches/Branch_2_1/metatype/src/main/java/org/jboss/metatype/plugins/types.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Oct 21 14:01:34 EDT 2009


Author: emuckenhuber
Date: 2009-10-21 14:01:34 -0400 (Wed, 21 Oct 2009)
New Revision: 95321

Modified:
   projects/jboss-man/branches/Branch_2_1/metatype/src/main/java/org/jboss/metatype/plugins/types/DefaultMetaTypeFactory.java
Log:
revert, this should not have been committed.

Modified: projects/jboss-man/branches/Branch_2_1/metatype/src/main/java/org/jboss/metatype/plugins/types/DefaultMetaTypeFactory.java
===================================================================
--- projects/jboss-man/branches/Branch_2_1/metatype/src/main/java/org/jboss/metatype/plugins/types/DefaultMetaTypeFactory.java	2009-10-21 17:56:42 UTC (rev 95320)
+++ projects/jboss-man/branches/Branch_2_1/metatype/src/main/java/org/jboss/metatype/plugins/types/DefaultMetaTypeFactory.java	2009-10-21 18:01:34 UTC (rev 95321)
@@ -26,8 +26,6 @@
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
@@ -90,9 +88,6 @@
    /** The configuration */
    private static Configuration configuration;
    
-   /** Ignore bean types. */
-   private static final Collection<String> ignoreBeans = new HashSet<String>();
-   
    static
    {
       configuration = AccessController.doPrivileged(new PrivilegedAction<Configuration>()
@@ -102,11 +97,6 @@
             return new PropertyConfiguration();
          }
       });
-      
-      // FIXME this is a hack
-      ignoreBeans.add("org.jboss.logging.Logger");
-      ignoreBeans.add("java.util.logging.Logger");
-      ignoreBeans.add("org.apache.log4j.Logger");
    }
 
    /** The object type info */
@@ -384,44 +374,41 @@
       MutableCompositeMetaType result = new MutableCompositeMetaType(typeInfo.getName(), typeInfo.getName());
       typeInfo.setAttachment(MetaType.class.getName(), result);
 
-      if(ignoreBeans.contains(typeInfo.getName()) == false)
+      Set<String> keys = null;
+      Set<PropertyInfo> properties = beanInfo.getProperties();
+      if (properties != null && properties.size() > 0)
       {
-         Set<String> keys = null;
-         Set<PropertyInfo> properties = beanInfo.getProperties();
-         if (properties != null && properties.size() > 0)
+         for (PropertyInfo property : properties)
          {
-            for (PropertyInfo property : properties)
+            // Do we ignore this property?
+            CompositeValue compositeValue = property.getUnderlyingAnnotation(CompositeValue.class);
+            if (compositeValue != null && compositeValue.ignore())
+               continue;
+            
+            String name = property.getName();
+            if ("class".equals(name) == false)
             {
-               // Do we ignore this property?
-               CompositeValue compositeValue = property.getUnderlyingAnnotation(CompositeValue.class);
-               if (compositeValue != null && compositeValue.ignore())
-                  continue;
-               
-               String name = property.getName();
-               if ("class".equals(name) == false)
+               if (compositeValue != null)
                {
-                  if (compositeValue != null)
-                  {
-                     String compositeValueName = compositeValue.name();
-                     if (MetaTypeConstants.DEFAULT.equals(compositeValueName) == false)
-                        name = compositeValueName;
-                  }
-   
-                  TypeInfo itemTypeInfo = property.getType();
-                  MetaType metaType = resolve(itemTypeInfo);
-                  result.addItem(name, name, metaType);
-                  if (property.isAnnotationPresent(CompositeKey.class))
-                  {
-                     if (keys == null)
-                        keys = new LinkedHashSet<String>();
-                     keys.add(name);
-                  }
+                  String compositeValueName = compositeValue.name();
+                  if (MetaTypeConstants.DEFAULT.equals(compositeValueName) == false)
+                     name = compositeValueName;
                }
+
+               TypeInfo itemTypeInfo = property.getType();
+               MetaType metaType = resolve(itemTypeInfo);
+               result.addItem(name, name, metaType);
+               if (property.isAnnotationPresent(CompositeKey.class))
+               {
+                  if (keys == null)
+                     keys = new LinkedHashSet<String>();
+                  keys.add(name);
+               }
             }
          }
-         if (keys != null)
-            result.setKeys(keys);
       }
+      if (keys != null)
+         result.setKeys(keys);
       result.freeze();
       return result;
    }




More information about the jboss-cvs-commits mailing list