[seam-commits] Seam SVN: r12435 - in modules/xml/trunk/impl/src: main/java/org/jboss/seam/xml/bootstrap and 3 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Mon Apr 12 17:15:53 EDT 2010


Author: swd847
Date: 2010-04-12 17:15:52 -0400 (Mon, 12 Apr 2010)
New Revision: 12435

Removed:
   modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/annotations/
   modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/xmlconfigured/
   modules/xml/trunk/impl/src/test/resources/org/jboss/seam/xml/test/xmlconfigured/
Modified:
   modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java
   modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/ModelBuilder.java
Log:
remove @XmlConfigured, use @veto from weld-extensions instead



Modified: modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java
===================================================================
--- modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java	2010-04-12 20:34:47 UTC (rev 12434)
+++ modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java	2010-04-12 21:15:52 UTC (rev 12435)
@@ -23,7 +23,6 @@
 import javax.enterprise.inject.spi.ProcessAnnotatedType;
 import javax.enterprise.inject.spi.ProcessInjectionTarget;
 
-import org.jboss.seam.xml.annotations.XmlConfigured;
 import org.jboss.seam.xml.core.BeanResult;
 import org.jboss.seam.xml.core.XmlId;
 import org.jboss.seam.xml.core.XmlResult;
@@ -60,6 +59,8 @@
 
    List<Exception> errors = new ArrayList<Exception>();
 
+   Set<XmlProcessAnnotatedType<?>> queuedEvents = new HashSet<XmlProcessAnnotatedType<?>>();
+
    /**
     * This is the entry point for the extension
     */
@@ -139,6 +140,11 @@
 
    public <T> void processAnotated(@Observes ProcessAnnotatedType<T> event)
    {
+      // do not re-process events that we fired
+      if (event instanceof XmlProcessAnnotatedType<?>)
+      {
+         return;
+      }
       // veto implementation
       if (veto.contains(event.getAnnotatedType().getJavaClass()))
       {
@@ -146,12 +152,6 @@
          event.veto();
          return;
       }
-      if(event.getAnnotatedType().isAnnotationPresent(XmlConfigured.class))
-      {
-    	  log.info("Preventing installation of @XmlConfigured bean: " + event.getAnnotatedType().getJavaClass().getName());
-          event.veto();
-          return;
-      }
       boolean found = false;
       NewAnnotatedTypeBuilder builder = new NewAnnotatedTypeBuilder(event.getAnnotatedType());
       for (XmlResult r : results)

Modified: modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/ModelBuilder.java
===================================================================
--- modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/ModelBuilder.java	2010-04-12 20:34:47 UTC (rev 12434)
+++ modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/ModelBuilder.java	2010-04-12 21:15:52 UTC (rev 12435)
@@ -352,7 +352,6 @@
                   {
                      throw new XmlConfigurationException("<type> must have a single child element", rb.getDocument(), rb.getLineno());
                   }
-
                   type.overrideMethodParameterType(item.getMethod(), overridenTypes.get(0).getJavaClass(), param);
                }
             }



More information about the seam-commits mailing list