[webbeans-commits] Webbeans SVN: r2774 - in ri/trunk/impl/src/main/java/org/jboss/webbeans: xml/checker/beanchildren/ext and 1 other directories.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Sat Jun 6 17:24:44 EDT 2009
Author: pete.muir at jboss.org
Date: 2009-06-06 17:24:44 -0400 (Sat, 06 Jun 2009)
New Revision: 2774
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/checker/beanchildren/ext/AbstractBeanChildrenChecker.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/registrator/bean/ext/ResourceElementRegistrator.java
Log:
remove java6 deps
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java 2009-06-06 15:35:20 UTC (rev 2773)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java 2009-06-06 21:24:44 UTC (rev 2774)
@@ -25,20 +25,15 @@
import java.lang.reflect.WildcardType;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.NavigableMap;
-import java.util.NavigableSet;
import java.util.Set;
-import java.util.SortedMap;
+import java.util.SortedSet;
import java.util.Stack;
-import java.util.TreeMap;
import java.util.TreeSet;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
@@ -99,7 +94,6 @@
import org.jboss.webbeans.metadata.MetaDataCache;
import org.jboss.webbeans.metadata.StereotypeModel;
import org.jboss.webbeans.util.Beans;
-import org.jboss.webbeans.util.ListComparator;
import org.jboss.webbeans.util.Proxies;
import org.jboss.webbeans.util.Reflections;
import org.jboss.webbeans.util.collections.multi.ConcurrentListHashMultiMap;
@@ -1273,16 +1267,20 @@
return null;
}
- //make a copy so that the sort is stable with respect to new deployment types addded through the SPI
+ // make a copy so that the sort is stable with respect to new deployment types added through the SPI
+ // TODO This code needs to be in Resolver
+ // TODO This needs caching
final List<Class<? extends Annotation>> enabledDeploymentTypes = getEnabledDeploymentTypes();
- NavigableSet<Bean<? extends X>> sortedBeans = new TreeSet<Bean<? extends X>>(new Comparator<Bean<? extends X>>()
- {
+ SortedSet<Bean<? extends X>> sortedBeans = new TreeSet<Bean<? extends X>>(new Comparator<Bean<? extends X>>()
+ {
public int compare(Bean<? extends X> o1, Bean<? extends X> o2)
{
int diff = enabledDeploymentTypes.indexOf(o1) - enabledDeploymentTypes.indexOf(o2);
if (diff == 0)
+ {
throw new AmbiguousResolutionException();
+ }
return diff;
}
});
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/checker/beanchildren/ext/AbstractBeanChildrenChecker.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/checker/beanchildren/ext/AbstractBeanChildrenChecker.java 2009-06-06 15:35:20 UTC (rev 2773)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/checker/beanchildren/ext/AbstractBeanChildrenChecker.java 2009-06-06 21:24:44 UTC (rev 2774)
@@ -38,7 +38,6 @@
import javax.interceptor.InterceptorBindingType;
import javax.persistence.PersistenceContext;
import javax.persistence.PersistenceUnit;
-import javax.xml.ws.WebServiceRef;
import org.dom4j.Element;
import org.dom4j.Namespace;
@@ -193,11 +192,13 @@
beanChildClass.getRawType().equals(Stereotype.class) || beanChildClass.getRawType().equals(Named.class) ||
beanChildClass.getRawType().equals(Specializes.class) || beanChildClass.getRawType().equals(Realizes.class) ||
beanChildClass.isAnnotationPresent(Resource.class) || beanChildClass.isAnnotationPresent(EJB.class)||
- beanChildClass.isAnnotationPresent(WebServiceRef.class) || beanChildClass.isAnnotationPresent(PersistenceContext.class) ||
+ //beanChildClass.isAnnotationPresent(WebServiceRef.class) ||
+ beanChildClass.isAnnotationPresent(PersistenceContext.class) ||
beanChildClass.isAnnotationPresent(PersistenceUnit.class))
return;
if (beanChildClass.getRawType().equals(Resource.class) || beanChildClass.getRawType().equals(EJB.class) ||
- beanChildClass.getRawType().equals(WebServiceRef.class) || beanChildClass.getRawType().equals(PersistenceContext.class) ||
+ //beanChildClass.getRawType().equals(WebServiceRef.class) ||
+ beanChildClass.getRawType().equals(PersistenceContext.class) ||
beanChildClass.getRawType().equals(PersistenceUnit.class))
{
checkRIBean(beanChildElement.getParent(), beanClass);
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/registrator/bean/ext/ResourceElementRegistrator.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/registrator/bean/ext/ResourceElementRegistrator.java 2009-06-06 15:35:20 UTC (rev 2773)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/registrator/bean/ext/ResourceElementRegistrator.java 2009-06-06 21:24:44 UTC (rev 2774)
@@ -29,7 +29,6 @@
import javax.enterprise.inject.deployment.DeploymentType;
import javax.persistence.PersistenceContext;
import javax.persistence.PersistenceUnit;
-import javax.xml.ws.WebServiceRef;
import org.dom4j.Element;
import org.jboss.webbeans.bean.RIBean;
@@ -218,7 +217,9 @@
{
Element childElement = (Element) elIterator.next();
AnnotatedClass<?> childClass = ParseXmlHelper.loadElementClass(childElement, Object.class, environment, packagesMap);
- if (childClass.getRawType().isAnnotation() && !childClass.isAnnotationPresent(DeploymentType.class) && !childClass.getRawType().equals(Resource.class) && !childClass.getRawType().equals(PersistenceContext.class) && !childClass.getRawType().equals(PersistenceUnit.class) && !childClass.getRawType().equals(EJB.class) && !childClass.getRawType().equals(WebServiceRef.class))
+ if (childClass.getRawType().isAnnotation() && !childClass.isAnnotationPresent(DeploymentType.class) && !childClass.getRawType().equals(Resource.class) && !childClass.getRawType().equals(PersistenceContext.class) && !childClass.getRawType().equals(PersistenceUnit.class) && !childClass.getRawType().equals(EJB.class)
+ // && !childClass.getRawType().equals(WebServiceRef.class)
+ )
{
Class<?> annotationClass = childClass.getRawType();
Method[] annotationMethods = annotationClass.getDeclaredMethods();
More information about the weld-commits
mailing list