Weld SVN: r6230 - in core/trunk/impl/src/main/java/org/jboss/weld: introspector/jlr and 1 other directories.
by weld-commits@lists.jboss.org
Author: dallen6
Date: 2010-05-14 07:26:08 -0400 (Fri, 14 May 2010)
New Revision: 6230
Added:
core/trunk/impl/src/main/java/org/jboss/weld/util/collections/ImmutableArraySet.java
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java
core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldAnnotated.java
core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldClassImpl.java
core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldMethodImpl.java
Log:
WELD-476 First phase complete; application now deploys on GF with default memory
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java 2010-05-13 16:10:10 UTC (rev 6229)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java 2010-05-14 11:26:08 UTC (rev 6230)
@@ -55,6 +55,7 @@
import org.jboss.weld.metadata.cache.MergedStereotypes;
import org.jboss.weld.metadata.cache.MetaAnnotationStore;
import org.jboss.weld.util.Beans;
+import org.jboss.weld.util.collections.ImmutableArraySet;
import org.jboss.weld.util.reflection.Reflections;
import org.slf4j.cal10n.LocLogger;
@@ -115,6 +116,7 @@
initName();
initScope();
checkDelegateInjectionPoints();
+ this.qualifiers = new ImmutableArraySet<Annotation>(qualifiers);
}
protected void initStereotypes()
@@ -168,15 +170,18 @@
{
if (getWeldAnnotated().isAnnotationPresent(Typed.class))
{
- this.types = getTypedTypes(Reflections.buildTypeMap(getWeldAnnotated().getTypeClosure()), getWeldAnnotated().getJavaClass(), getWeldAnnotated().getAnnotation(Typed.class));
+ this.types = new ImmutableArraySet<Type>(getTypedTypes(Reflections.buildTypeMap(getWeldAnnotated().getTypeClosure()), getWeldAnnotated().getJavaClass(), getWeldAnnotated().getAnnotation(Typed.class)));
}
else
{
- this.types = new HashSet<Type>(getWeldAnnotated().getTypeClosure());
if (getType().isInterface())
{
- this.types.add(Object.class);
+ this.types = new ImmutableArraySet<Type>(getWeldAnnotated().getTypeClosure(), Object.class);
}
+ else
+ {
+ this.types = new ImmutableArraySet<Type>(getWeldAnnotated().getTypeClosure());
+ }
}
}
@@ -201,7 +206,7 @@
protected void initQualifiers()
{
this.qualifiers = new HashSet<Annotation>();
- this.qualifiers.addAll(getWeldAnnotated().getMetaAnnotations(Qualifier.class));
+ qualifiers.addAll(getWeldAnnotated().getMetaAnnotations(Qualifier.class));
initDefaultQualifiers();
log.trace(QUALIFIERS_USED, qualifiers, this);
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldAnnotated.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldAnnotated.java 2010-05-13 16:10:10 UTC (rev 6229)
+++ core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldAnnotated.java 2010-05-14 11:26:08 UTC (rev 6230)
@@ -23,7 +23,6 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
-import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
@@ -39,15 +38,11 @@
import org.jboss.weld.resources.ClassTransformer;
import org.jboss.weld.util.Proxies;
import org.jboss.weld.util.collections.Arrays2;
-import org.jboss.weld.util.collections.HashSetSupplier;
+import org.jboss.weld.util.collections.ImmutableArraySet;
import org.jboss.weld.util.reflection.HierarchyDiscovery;
-import com.google.common.collect.ClassToInstanceMap;
-import com.google.common.collect.HashBiMap;
+import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
-import com.google.common.collect.Multimaps;
-import com.google.common.collect.MutableClassToInstanceMap;
-import com.google.common.collect.SetMultimap;
/**
* Represents functionality common for all annotated items, mainly different
@@ -131,12 +126,12 @@
private final Map<Class<? extends Annotation>, Annotation> annotationMap;
// The meta-annotation map (annotation type -> set of annotations containing
// meta-annotation) of the item
- private final SetMultimap<Class<? extends Annotation>, Annotation> metaAnnotationMap;
+ private final ArrayListMultimap<Class<? extends Annotation>, Annotation> metaAnnotationMap;
private final Class<T> rawType;
private final Type[] actualTypeArguments;
private final Type type;
- private final Set<Type> typeClosure;
+ private final ImmutableArraySet<Type> typeClosure;
private final boolean proxyable;
/**
@@ -155,12 +150,13 @@
throw new WeldException(ANNOTATION_MAP_NULL);
}
this.annotationMap = annotationMap;
- this.metaAnnotationMap = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<Annotation>>(), HashSetSupplier.<Annotation>instance());
+ this.metaAnnotationMap = ArrayListMultimap.<Class<? extends Annotation>, Annotation> create();
for (Annotation annotation : annotationMap.values())
{
addMetaAnnotations(metaAnnotationMap, annotation, annotation.annotationType().getAnnotations(), false);
addMetaAnnotations(metaAnnotationMap, annotation, classTransformer.getTypeStore().get(annotation.annotationType()), false);
}
+ this.metaAnnotationMap.trimToSize();
if (declaredAnnotationMap == null)
{
@@ -176,7 +172,7 @@
{
this.actualTypeArguments = new Type[0];
}
- this.typeClosure = typeClosure;
+ this.typeClosure = new ImmutableArraySet<Type>(typeClosure);
this.proxyable = Proxies.isTypesProxyable(typeClosure);
}
@@ -187,13 +183,14 @@
throw new WeldException(ANNOTATION_MAP_NULL);
}
this.annotationMap = annotationMap;
- this.metaAnnotationMap = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<Annotation>>(), HashSetSupplier.<Annotation>instance());
+ this.metaAnnotationMap = ArrayListMultimap.<Class<? extends Annotation>, Annotation> create();
for (Annotation annotation : annotationMap.values())
{
addMetaAnnotations(metaAnnotationMap, annotation, annotation.annotationType().getAnnotations(), false);
addMetaAnnotations(metaAnnotationMap, annotation, typeStore.get(annotation.annotationType()), false);
}
-
+ this.metaAnnotationMap.trimToSize();
+
if (declaredAnnotationMap == null)
{
throw new WeldException(DECLARED_ANNOTATION_MAP_NULL);
@@ -261,12 +258,12 @@
public Set<Annotation> getAnnotations()
{
- return Collections.unmodifiableSet(new HashSet<Annotation>(annotationMap.values()));
+ return new ImmutableArraySet<Annotation>(annotationMap.values());
}
public Set<Annotation> getMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
{
- return Collections.unmodifiableSet(metaAnnotationMap.get(metaAnnotationType));
+ return new ImmutableArraySet<Annotation>(metaAnnotationMap.get(metaAnnotationType));
}
@Deprecated
Modified: core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldClassImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldClassImpl.java 2010-05-13 16:10:10 UTC (rev 6229)
+++ core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldClassImpl.java 2010-05-14 11:26:08 UTC (rev 6230)
@@ -48,6 +48,7 @@
import org.jboss.weld.introspector.WeldMethod;
import org.jboss.weld.resources.ClassTransformer;
import org.jboss.weld.util.Names;
+import org.jboss.weld.util.collections.ImmutableArraySet;
import org.jboss.weld.util.reflection.HierarchyDiscovery;
import org.jboss.weld.util.reflection.Reflections;
import org.jboss.weld.util.reflection.SecureReflections;
@@ -673,25 +674,25 @@
@SuppressWarnings("unchecked")
public Set<AnnotatedConstructor<T>> getConstructors()
{
- return new HashSet(constructors);
+ return new ImmutableArraySet(constructors);
}
@SuppressWarnings("unchecked")
public Set<AnnotatedField<? super T>> getFields()
{
- return new HashSet(fields);
+ return new ImmutableArraySet(fields);
}
@SuppressWarnings("unchecked")
public Set<AnnotatedMethod<? super T>> getMethods()
{
- return new HashSet(methods);
+ return new ImmutableArraySet(methods);
}
@SuppressWarnings("unchecked")
public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
{
- return Collections.unmodifiableSet(new HashSet(declaredMetaAnnotationMap.get(metaAnnotationType)));
+ return new ImmutableArraySet(declaredMetaAnnotationMap.get(metaAnnotationType));
}
public boolean isDiscovered()
Modified: core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldMethodImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldMethodImpl.java 2010-05-13 16:10:10 UTC (rev 6229)
+++ core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldMethodImpl.java 2010-05-14 11:26:08 UTC (rev 6230)
@@ -94,8 +94,8 @@
{
super(annotationMap, declaredAnnotationMap, classTransformer, method, rawType, type, typeClosure, declaringClass);
this.method = method;
- this.parameters = new ArrayList<WeldParameter<?, X>>();
- this.annotatedParameters = ArrayListMultimap.<Class<? extends Annotation>, WeldParameter<?, X>> create();
+ this.parameters = new ArrayList<WeldParameter<?, X>>(method.getParameterTypes().length);
+ this.annotatedParameters = ArrayListMultimap.<Class<? extends Annotation>, WeldParameter<?, X>> create(2, method.getParameterTypes().length);
if (annotatedMethod == null)
{
Added: core/trunk/impl/src/main/java/org/jboss/weld/util/collections/ImmutableArraySet.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/collections/ImmutableArraySet.java (rev 0)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/collections/ImmutableArraySet.java 2010-05-14 11:26:08 UTC (rev 6230)
@@ -0,0 +1,247 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.weld.util.collections;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+import java.util.Set;
+
+/**
+ * <p>
+ * A {@link Set} which is immutable and backed by a simple array of elements.
+ * This provides all the behaviors of a set except for those methods which would
+ * otherwise modify the contents of the set.
+ * </p>
+ * <p>
+ * The primary use of this set is for those cases where small sets exists and
+ * will not be changed. The savings in memory is significant compared to hash
+ * sets which may contain many empty buckets.
+ * </p>
+ *
+ * @author David Allen
+ */
+public class ImmutableArraySet<E> implements Set<E>
+{
+
+ private Object[] elements;
+
+ public ImmutableArraySet(Collection<E> initialElements)
+ {
+ addElements(initialElements, initialElements.size());
+ }
+
+ public ImmutableArraySet(Collection<E> initialElements, E lastElement)
+ {
+ addElements(initialElements, initialElements.size() + 1);
+ this.elements[initialElements.size()] = lastElement;
+ }
+
+ protected void addElements(Collection<E> otherSet, int desiredSize)
+ {
+ boolean realSet = otherSet instanceof Set<?>;
+ Iterator<E> setIterator = otherSet.iterator();
+ int i = 0;
+ elements = new Object[desiredSize];
+ while (setIterator.hasNext())
+ {
+ E element = setIterator.next();
+ if (realSet || !contains(element))
+ {
+ elements[i++] = element;
+ }
+ }
+ // Compute the reduction due to duplicates, if any
+ int reduceBy = otherSet.size() - i - 1;
+ if (reduceBy > 0)
+ {
+ Object[] newElements = new Object[desiredSize - reduceBy];
+ System.arraycopy(elements, 0, newElements, 0, desiredSize - reduceBy);
+ elements = newElements;
+ }
+ }
+
+ public boolean add(E e)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean addAll(Collection<? extends E> c)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void clear()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean contains(Object o)
+ {
+ for (int i = 0; i < elements.length; i++)
+ {
+ if (elements[i] == null)
+ {
+ break; // End of valid values
+ }
+ if ((o == elements[i]) || (o.equals(elements[i])))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public boolean containsAll(Collection<?> c)
+ {
+ for (Object object : c)
+ {
+ if (contains(object))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public boolean isEmpty()
+ {
+ return elements == null ? true : elements.length == 0;
+ }
+
+ class UnmodifiableIterator implements Iterator<E>
+ {
+ private int currentElement = 0;
+
+ public boolean hasNext()
+ {
+ return elements == null ? false : currentElement < elements.length;
+ }
+
+ @SuppressWarnings("unchecked")
+ public E next()
+ {
+ if (!hasNext())
+ {
+ throw new NoSuchElementException();
+ }
+ return (E) elements[currentElement++];
+ }
+
+ public void remove()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ }
+
+ public Iterator<E> iterator()
+ {
+ return new UnmodifiableIterator();
+ }
+
+ public boolean remove(Object o)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean removeAll(Collection<?> c)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean retainAll(Collection<?> c)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public int size()
+ {
+ return elements == null ? 0 : elements.length;
+ }
+
+ public Object[] toArray()
+ {
+ return elements == null ? new Object[0] : elements.length == 0 ? elements : Arrays.copyOf(elements, elements.length);
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T> T[] toArray(T[] a)
+ {
+ int elementQuantity = size();
+ if (a.length < elementQuantity)
+ {
+ return (T[]) Arrays.copyOf(elements, elements.length, a.getClass());
+ }
+ if (elementQuantity > 0)
+ {
+ System.arraycopy(elements, 0, a, 0, elementQuantity);
+ }
+ for (int i = elementQuantity; i < a.length; i++)
+ {
+ a[i] = null;
+ }
+ return a;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (obj instanceof Set<?>)
+ {
+ int elementQuantity = size();
+ Object[] otherArray = ((Set<?>) obj).toArray();
+ if (elementQuantity != otherArray.length)
+ {
+ return false;
+ }
+ boolean arraysEqual = true;
+ for (int i = 0; i < elementQuantity; i++)
+ {
+ boolean objFound = false;
+ for (int j = 0; j < otherArray.length; j++)
+ {
+ if (elements[i].equals(otherArray[j]))
+ {
+ objFound = true;
+ break;
+ }
+ }
+ if (!objFound)
+ {
+ arraysEqual = false;
+ break;
+ }
+ }
+ return arraysEqual;
+ }
+ return false;
+ }
+
+ @Override
+ public String toString()
+ {
+ return Arrays.toString(elements);
+ }
+
+}
Property changes on: core/trunk/impl/src/main/java/org/jboss/weld/util/collections/ImmutableArraySet.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
13 years, 11 months
Weld SVN: r6229 - core/trunk/osgi-bundle.
by weld-commits@lists.jboss.org
Author: rogerk
Date: 2010-05-13 12:10:10 -0400 (Thu, 13 May 2010)
New Revision: 6229
Modified:
core/trunk/osgi-bundle/pom.xml
Log:
synch up exported packages with 1.0.1 SP2
Modified: core/trunk/osgi-bundle/pom.xml
===================================================================
--- core/trunk/osgi-bundle/pom.xml 2010-05-12 18:56:12 UTC (rev 6228)
+++ core/trunk/osgi-bundle/pom.xml 2010-05-13 16:10:10 UTC (rev 6229)
@@ -83,10 +83,13 @@
org.jboss.weld.conversation;
org.jboss.weld;
org.jboss.weld.bootstrap;
+ org.jboss.weld.event;
org.jboss.weld.injection;
org.jboss.weld.introspector;
+ org.jboss.weld.introspector.jlr;
org.jboss.weld.manager;
org.jboss.weld.servlet;
+ org.jboss.weld.util;
org.jboss.interceptor.*;
version=${osgi.version},
org.jboss.weld.el;
13 years, 11 months
Weld SVN: r6228 - core/trunk/impl/src/main/java/org/jboss/weld/exceptions.
by weld-commits@lists.jboss.org
Author: dallen6
Date: 2010-05-12 14:56:12 -0400 (Wed, 12 May 2010)
New Revision: 6228
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/exceptions/WeldExceptionListMessage.java
Log:
Added missing message content.
Modified: core/trunk/impl/src/main/java/org/jboss/weld/exceptions/WeldExceptionListMessage.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/exceptions/WeldExceptionListMessage.java 2010-05-12 01:56:37 UTC (rev 6227)
+++ core/trunk/impl/src/main/java/org/jboss/weld/exceptions/WeldExceptionListMessage.java 2010-05-12 18:56:12 UTC (rev 6228)
@@ -54,7 +54,8 @@
private void generateMessage()
{
- PrintWriter messageBuffer = new PrintWriter(new StringWriter());
+ StringWriter writer = new StringWriter();
+ PrintWriter messageBuffer = new PrintWriter(writer);
messageBuffer.print("Exception List with ");
messageBuffer.print(causes.size());
messageBuffer.print(" exceptions:\n");
@@ -66,6 +67,8 @@
messageBuffer.print(" :\n");
throwable.printStackTrace(messageBuffer);
}
+ messageBuffer.flush();
+ message = writer.toString();
}
}
13 years, 12 months
Weld SVN: r6227 - in core/tags/1.0.1-SP2: bom and 7 other directories.
by weld-commits@lists.jboss.org
Author: rogerk
Date: 2010-05-11 21:56:37 -0400 (Tue, 11 May 2010)
New Revision: 6227
Modified:
core/tags/1.0.1-SP2/bom/pom.xml
core/tags/1.0.1-SP2/impl/pom.xml
core/tags/1.0.1-SP2/inject-tck-runner/pom.xml
core/tags/1.0.1-SP2/jboss-tck-runner/pom.xml
core/tags/1.0.1-SP2/osgi-bundle/pom.xml
core/tags/1.0.1-SP2/parent/pom.xml
core/tags/1.0.1-SP2/pom.xml
core/tags/1.0.1-SP2/porting-package/pom.xml
core/tags/1.0.1-SP2/tests/pom.xml
Log:
pom updates
Modified: core/tags/1.0.1-SP2/bom/pom.xml
===================================================================
--- core/tags/1.0.1-SP2/bom/pom.xml 2010-05-11 18:27:51 UTC (rev 6226)
+++ core/tags/1.0.1-SP2/bom/pom.xml 2010-05-12 01:56:37 UTC (rev 6227)
@@ -138,7 +138,7 @@
<!-- SCM and distribution management -->
<scm>
<connection>scm:svn:https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/bom</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/core/branches/1.0.1-SP2/bom</developerConnection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/bom</developerConnection>
<url>https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/bom</url>
</scm>
Modified: core/tags/1.0.1-SP2/impl/pom.xml
===================================================================
--- core/tags/1.0.1-SP2/impl/pom.xml 2010-05-11 18:27:51 UTC (rev 6226)
+++ core/tags/1.0.1-SP2/impl/pom.xml 2010-05-12 01:56:37 UTC (rev 6227)
@@ -179,7 +179,7 @@
<scm>
<connection>scm:svn:https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/impl</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/core/branches/1.0.1-SP2/impl</developerConnection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/impl</developerConnection>
<url>https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/impl</url>
</scm>
Modified: core/tags/1.0.1-SP2/inject-tck-runner/pom.xml
===================================================================
--- core/tags/1.0.1-SP2/inject-tck-runner/pom.xml 2010-05-11 18:27:51 UTC (rev 6226)
+++ core/tags/1.0.1-SP2/inject-tck-runner/pom.xml 2010-05-12 01:56:37 UTC (rev 6227)
@@ -88,7 +88,7 @@
<scm>
<connection>scm:svn:https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/inject-tck-r...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/core/branches/1.0.1-SP2/inject-t...</developerConnection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/inject-tck-r...</developerConnection>
<url>https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/inject-tck-runner</url>
</scm>
Modified: core/tags/1.0.1-SP2/jboss-tck-runner/pom.xml
===================================================================
--- core/tags/1.0.1-SP2/jboss-tck-runner/pom.xml 2010-05-11 18:27:51 UTC (rev 6226)
+++ core/tags/1.0.1-SP2/jboss-tck-runner/pom.xml 2010-05-12 01:56:37 UTC (rev 6227)
@@ -315,7 +315,7 @@
<scm>
<connection>scm:svn:https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/jboss-tck-ru...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/core/branches/1.0.1-SP2/jboss-tc...</developerConnection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/jboss-tck-ru...</developerConnection>
<url>https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/jboss-tck-runner</url>
</scm>
Modified: core/tags/1.0.1-SP2/osgi-bundle/pom.xml
===================================================================
--- core/tags/1.0.1-SP2/osgi-bundle/pom.xml 2010-05-11 18:27:51 UTC (rev 6226)
+++ core/tags/1.0.1-SP2/osgi-bundle/pom.xml 2010-05-12 01:56:37 UTC (rev 6227)
@@ -200,7 +200,7 @@
<scm>
<connection>scm:svn:https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/osgi-bundle</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/core/branches/1.0.1-SP2/osgi-bundle</developerConnection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/osgi-bundle</developerConnection>
<url>https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/osgi-bundle</url>
</scm>
Modified: core/tags/1.0.1-SP2/parent/pom.xml
===================================================================
--- core/tags/1.0.1-SP2/parent/pom.xml 2010-05-11 18:27:51 UTC (rev 6226)
+++ core/tags/1.0.1-SP2/parent/pom.xml 2010-05-12 01:56:37 UTC (rev 6227)
@@ -172,7 +172,7 @@
<scm>
<connection>scm:svn:https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/parent</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/core/branches/1.0.1-SP2/parent</developerConnection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/parent</developerConnection>
<url>https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/parent</url>
</scm>
Modified: core/tags/1.0.1-SP2/pom.xml
===================================================================
--- core/tags/1.0.1-SP2/pom.xml 2010-05-11 18:27:51 UTC (rev 6226)
+++ core/tags/1.0.1-SP2/pom.xml 2010-05-12 01:56:37 UTC (rev 6227)
@@ -24,7 +24,7 @@
<!-- SCM and distribution management -->
<scm>
<connection>scm:svn:https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/core/branches/1.0.1-SP2</developerConnection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2</developerConnection>
<url>https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2</url>
</scm>
Modified: core/tags/1.0.1-SP2/porting-package/pom.xml
===================================================================
--- core/tags/1.0.1-SP2/porting-package/pom.xml 2010-05-11 18:27:51 UTC (rev 6226)
+++ core/tags/1.0.1-SP2/porting-package/pom.xml 2010-05-12 01:56:37 UTC (rev 6227)
@@ -56,7 +56,7 @@
<scm>
<connection>scm:svn:https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/porting-package</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/core/branches/1.0.1-SP2/porting-...</developerConnection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/porting-package</developerConnection>
<url>https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/porting-package</url>
</scm>
Modified: core/tags/1.0.1-SP2/tests/pom.xml
===================================================================
--- core/tags/1.0.1-SP2/tests/pom.xml 2010-05-11 18:27:51 UTC (rev 6226)
+++ core/tags/1.0.1-SP2/tests/pom.xml 2010-05-12 01:56:37 UTC (rev 6227)
@@ -285,7 +285,7 @@
<scm>
<connection>scm:svn:https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/tests</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/core/branches/1.0.1-SP2/tests</developerConnection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/tests</developerConnection>
<url>https://svn.jboss.org/repos/weld/core/tags/1.0.1-SP2/tests</url>
</scm>
13 years, 12 months
Weld SVN: r6226 - core/tags.
by weld-commits@lists.jboss.org
Author: rogerk
Date: 2010-05-11 14:27:51 -0400 (Tue, 11 May 2010)
New Revision: 6226
Added:
core/tags/1.0.1-SP2/
Log:
1.0.1 SP2 tag from branch
Copied: core/tags/1.0.1-SP2 (from rev 6225, core/branches/1.0.1-SP2)
13 years, 12 months
Weld SVN: r6225 - java-se/trunk/src/main/java/org/jboss/weld/environment/se/util.
by weld-commits@lists.jboss.org
Author: peteroyle
Date: 2010-05-11 09:21:25 -0400 (Tue, 11 May 2010)
New Revision: 6225
Modified:
java-se/trunk/src/main/java/org/jboss/weld/environment/se/util/WeldManagerUtils.java
Log:
Deprecated WeldManagerUtils. It's replaced by Weld.instance()
Modified: java-se/trunk/src/main/java/org/jboss/weld/environment/se/util/WeldManagerUtils.java
===================================================================
--- java-se/trunk/src/main/java/org/jboss/weld/environment/se/util/WeldManagerUtils.java 2010-05-10 16:58:39 UTC (rev 6224)
+++ java-se/trunk/src/main/java/org/jboss/weld/environment/se/util/WeldManagerUtils.java 2010-05-11 13:21:25 UTC (rev 6225)
@@ -25,6 +25,7 @@
/**
*
* @author Peter Royle
+ * @deprecated This should be replaced with usages of Weld.instance()
*/
public class WeldManagerUtils
{
13 years, 12 months
Weld SVN: r6224 - in core/trunk/impl/src/main/java/org/jboss/weld: introspector and 3 other directories.
by weld-commits@lists.jboss.org
Author: dallen6
Date: 2010-05-10 12:58:39 -0400 (Mon, 10 May 2010)
New Revision: 6224
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/bean/DecoratorImpl.java
core/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldClass.java
core/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldClass.java
core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldAnnotated.java
core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldClassImpl.java
core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldMethodImpl.java
core/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java
core/trunk/impl/src/main/java/org/jboss/weld/util/reflection/HierarchyDiscovery.java
Log:
WELD-476 First phase; we get past reflection and start deploying many beans, but still too much memory is used
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/DecoratorImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/DecoratorImpl.java 2010-05-10 14:26:25 UTC (rev 6223)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/DecoratorImpl.java 2010-05-10 16:58:39 UTC (rev 6224)
@@ -217,7 +217,7 @@
}
}
}
- annotatedDelegateItem = WeldClassImpl.of(delegateInjectionPoint.getJavaClass(), beanManager.getServices().get(ClassTransformer.class));
+ annotatedDelegateItem = beanManager.getServices().get(ClassTransformer.class).loadClass(delegateInjectionPoint.getJavaClass());
}
private void checkAbstractMethods()
Modified: core/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldClass.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldClass.java 2010-05-10 14:26:25 UTC (rev 6223)
+++ core/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldClass.java 2010-05-10 16:58:39 UTC (rev 6224)
@@ -18,6 +18,7 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
+import java.util.Collection;
import java.util.Set;
public abstract class ForwardingWeldClass<T> extends ForwardingWeldAnnotated<T, Class<T>> implements WeldClass<T>
@@ -26,17 +27,17 @@
@Override
protected abstract WeldClass<T> delegate();
- public Set<WeldConstructor<T>> getWeldConstructors(Class<? extends Annotation> annotationType)
+ public Collection<WeldConstructor<T>> getWeldConstructors(Class<? extends Annotation> annotationType)
{
return delegate().getWeldConstructors(annotationType);
}
- public Set<WeldField<?, ?>> getWeldFields(Class<? extends Annotation> annotationType)
+ public Collection<WeldField<?, ?>> getWeldFields(Class<? extends Annotation> annotationType)
{
return delegate().getWeldFields(annotationType);
}
- public Set<WeldMethod<?, ?>> getWeldMethods(Class<? extends Annotation> annotationType)
+ public Collection<WeldMethod<?, ?>> getWeldMethods(Class<? extends Annotation> annotationType)
{
return delegate().getWeldMethods(annotationType);
}
@@ -46,27 +47,27 @@
return delegate().getNoArgsWeldConstructor();
}
- public Set<WeldMethod<?, ?>> getWeldMethods()
+ public Collection<WeldMethod<?, ?>> getWeldMethods()
{
return delegate().getWeldMethods();
}
- public Set<WeldField<?, ? super T>> getDeclaredWeldFields(Class<? extends Annotation> annotationType)
+ public Collection<WeldField<?, ? super T>> getDeclaredWeldFields(Class<? extends Annotation> annotationType)
{
return delegate().getDeclaredWeldFields(annotationType);
}
- public Set<WeldMethod<?, ? super T>> getDeclaredWeldMethods(Class<? extends Annotation> annotationType)
+ public Collection<WeldMethod<?, ? super T>> getDeclaredWeldMethods(Class<? extends Annotation> annotationType)
{
return delegate().getDeclaredWeldMethods(annotationType);
}
- public Set<WeldMethod<?, ? super T>> getDeclaredWeldMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
+ public Collection<WeldMethod<?, ? super T>> getDeclaredWeldMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
{
return delegate().getDeclaredWeldMethodsWithAnnotatedParameters(annotationType);
}
- public Set<WeldField<?, ?>> getWeldFields()
+ public Collection<WeldField<?, ?>> getWeldFields()
{
return delegate().getWeldFields();
}
@@ -164,7 +165,7 @@
return delegate().getSimpleName();
}
- public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
+ public Collection<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
{
return delegate().getDeclaredMetaAnnotations(metaAnnotationType);
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldClass.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldClass.java 2010-05-10 14:26:25 UTC (rev 6223)
+++ core/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldClass.java 2010-05-10 16:58:39 UTC (rev 6224)
@@ -18,6 +18,7 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
+import java.util.Collection;
import java.util.Set;
import javax.enterprise.inject.spi.AnnotatedType;
@@ -36,21 +37,21 @@
*
* @return A set of abstracted fields
*/
- public Set<WeldField<?, ?>> getWeldFields();
+ public Collection<WeldField<?, ?>> getWeldFields();
/**
* Gets all fields on the type
*
* @return A set of abstracted fields
*/
- public Set<WeldMethod<?, ?>> getWeldMethods();
+ public Collection<WeldMethod<?, ?>> getWeldMethods();
/**
* Gets all fields on the type
*
* @return A set of abstracted fields
*/
- public Set<WeldMethod<?, ?>> getDeclaredWeldMethods();
+ public Collection<WeldMethod<?, ?>> getDeclaredWeldMethods();
/**
* Get a field by name
@@ -69,7 +70,7 @@
* @return A set of abstracted fields with the given annotation. Returns an
* empty set if there are no matches
*/
- public Set<WeldField<?, ?>> getWeldFields(Class<? extends Annotation> annotationType);
+ public Collection<WeldField<?, ?>> getWeldFields(Class<? extends Annotation> annotationType);
/**
* Gets all fields which are annotated with the given annotation type on this
@@ -79,7 +80,7 @@
* @return A set of abstracted fields with the given annotation. Returns an
* empty set if there are no matches
*/
- public Set<WeldField<?, ? super T>> getDeclaredWeldFields(Class<? extends Annotation> annotationType);
+ public Collection<WeldField<?, ? super T>> getDeclaredWeldFields(Class<? extends Annotation> annotationType);
/**
* Gets all constructors which are annotated with annotationType
@@ -88,7 +89,7 @@
* @return A set of abstracted fields with the given annotation. Returns an
* empty set if there are no matches
*/
- public Set<WeldConstructor<T>> getWeldConstructors(Class<? extends Annotation> annotationType);
+ public Collection<WeldConstructor<T>> getWeldConstructors(Class<? extends Annotation> annotationType);
/**
* Gets the no-args constructor
@@ -112,7 +113,7 @@
* @return A set of abstracted methods with the given annotation. Returns an
* empty set if there are no matches
*/
- public Set<WeldMethod<?, ?>> getWeldMethods(Class<? extends Annotation> annotationType);
+ public Collection<WeldMethod<?, ?>> getWeldMethods(Class<? extends Annotation> annotationType);
/**
* Gets all methods annotated with annotationType
@@ -121,7 +122,7 @@
* @return A set of abstracted methods with the given annotation. Returns an
* empty set if there are no matches
*/
- public Set<WeldMethod<?, ? super T>> getDeclaredWeldMethods(Class<? extends Annotation> annotationType);
+ public Collection<WeldMethod<?, ? super T>> getDeclaredWeldMethods(Class<? extends Annotation> annotationType);
/**
* Find the annotated method for a given methodDescriptor
@@ -163,7 +164,7 @@
* @return A set of abstracted methods with the given annotation. Returns an
* empty set if there are no matches
*/
- public Set<WeldMethod<?, ? super T>> getDeclaredWeldMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType);
+ public Collection<WeldMethod<?, ? super T>> getDeclaredWeldMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType);
/**
* Gets the superclass.
@@ -210,6 +211,6 @@
* @return A set of matching meta-annotations. Returns an empty set if there
* are no matches.
*/
- public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType);
+ public Collection<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType);
}
\ No newline at end of file
Modified: core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldAnnotated.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldAnnotated.java 2010-05-10 14:26:25 UTC (rev 6223)
+++ core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldAnnotated.java 2010-05-10 16:58:39 UTC (rev 6224)
@@ -42,9 +42,11 @@
import org.jboss.weld.util.collections.HashSetSupplier;
import org.jboss.weld.util.reflection.HierarchyDiscovery;
-import com.google.common.collect.BiMap;
+import com.google.common.collect.ClassToInstanceMap;
import com.google.common.collect.HashBiMap;
+import com.google.common.collect.Multimap;
import com.google.common.collect.Multimaps;
+import com.google.common.collect.MutableClassToInstanceMap;
import com.google.common.collect.SetMultimap;
/**
@@ -100,7 +102,7 @@
}
- protected static void addMetaAnnotations(SetMultimap<Class<? extends Annotation>, Annotation> metaAnnotationMap, Annotation annotation, Annotation[] metaAnnotations, boolean declared)
+ protected static void addMetaAnnotations(Multimap<Class<? extends Annotation>, Annotation> metaAnnotationMap, Annotation annotation, Annotation[] metaAnnotations, boolean declared)
{
for (Annotation metaAnnotation : metaAnnotations)
{
@@ -108,7 +110,7 @@
}
}
- protected static void addMetaAnnotations(SetMultimap<Class<? extends Annotation>, Annotation> metaAnnotationMap, Annotation annotation, Iterable<Annotation> metaAnnotations, boolean declared)
+ protected static void addMetaAnnotations(Multimap<Class<? extends Annotation>, Annotation> metaAnnotationMap, Annotation annotation, Iterable<Annotation> metaAnnotations, boolean declared)
{
for (Annotation metaAnnotation : metaAnnotations)
{
@@ -116,7 +118,7 @@
}
}
- private static void addMetaAnnotation(SetMultimap<Class<? extends Annotation>, Annotation> metaAnnotationMap, Annotation annotation, Class<? extends Annotation> metaAnnotationType, boolean declared)
+ private static void addMetaAnnotation(Multimap<Class<? extends Annotation>, Annotation> metaAnnotationMap, Annotation annotation, Class<? extends Annotation> metaAnnotationType, boolean declared)
{
// Only map meta-annotations we are interested in
if (declared ? MAPPED_DECLARED_METAANNOTATIONS.contains(metaAnnotationType) : MAPPED_METAANNOTATIONS.contains(metaAnnotationType))
@@ -126,7 +128,7 @@
}
// The annotation map (annotation type -> annotation) of the item
- private final BiMap<Class<? extends Annotation>, Annotation> annotationMap;
+ private final Map<Class<? extends Annotation>, Annotation> annotationMap;
// The meta-annotation map (annotation type -> set of annotations containing
// meta-annotation) of the item
private final SetMultimap<Class<? extends Annotation>, Annotation> metaAnnotationMap;
@@ -152,13 +154,12 @@
{
throw new WeldException(ANNOTATION_MAP_NULL);
}
- this.annotationMap = HashBiMap.create(annotationMap.size());
+ this.annotationMap = annotationMap;
this.metaAnnotationMap = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<Annotation>>(), HashSetSupplier.<Annotation>instance());
for (Annotation annotation : annotationMap.values())
{
addMetaAnnotations(metaAnnotationMap, annotation, annotation.annotationType().getAnnotations(), false);
addMetaAnnotations(metaAnnotationMap, annotation, classTransformer.getTypeStore().get(annotation.annotationType()), false);
- this.annotationMap.put(annotation.annotationType(), annotation);
}
if (declaredAnnotationMap == null)
@@ -185,13 +186,12 @@
{
throw new WeldException(ANNOTATION_MAP_NULL);
}
- this.annotationMap = HashBiMap.create(annotationMap.size());
+ this.annotationMap = annotationMap;
this.metaAnnotationMap = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<Annotation>>(), HashSetSupplier.<Annotation>instance());
for (Annotation annotation : annotationMap.values())
{
addMetaAnnotations(metaAnnotationMap, annotation, annotation.annotationType().getAnnotations(), false);
addMetaAnnotations(metaAnnotationMap, annotation, typeStore.get(annotation.annotationType()), false);
- this.annotationMap.put(annotation.annotationType(), annotation);
}
if (declaredAnnotationMap == null)
@@ -261,7 +261,7 @@
public Set<Annotation> getAnnotations()
{
- return Collections.unmodifiableSet(annotationMap.values());
+ return Collections.unmodifiableSet(new HashSet<Annotation>(annotationMap.values()));
}
public Set<Annotation> getMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
Modified: core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldClassImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldClassImpl.java 2010-05-10 14:26:25 UTC (rev 6223)
+++ core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldClassImpl.java 2010-05-10 16:58:39 UTC (rev 6224)
@@ -48,13 +48,11 @@
import org.jboss.weld.introspector.WeldMethod;
import org.jboss.weld.resources.ClassTransformer;
import org.jboss.weld.util.Names;
-import org.jboss.weld.util.collections.HashSetSupplier;
import org.jboss.weld.util.reflection.HierarchyDiscovery;
import org.jboss.weld.util.reflection.Reflections;
import org.jboss.weld.util.reflection.SecureReflections;
-import com.google.common.collect.Multimaps;
-import com.google.common.collect.SetMultimap;
+import com.google.common.collect.ArrayListMultimap;
/**
* Represents an annotated class
@@ -69,7 +67,7 @@
public class WeldClassImpl<T> extends AbstractWeldAnnotated<T, Class<T>> implements WeldClass<T>
{
- private static <T> void mapConstructorAnnotations(SetMultimap<Class<? extends Annotation>, WeldConstructor<T>> annotatedConstructors, WeldConstructor<T> annotatedConstructor)
+ private static <T> void mapConstructorAnnotations(ArrayListMultimap<Class<? extends Annotation>, WeldConstructor<T>> annotatedConstructors, WeldConstructor<T> annotatedConstructor)
{
for (Annotation annotation : annotatedConstructor.getAnnotations())
{
@@ -85,43 +83,43 @@
private final WeldClass<?> superclass;
// The set of abstracted fields
- private final Set<WeldField<?, ?>> fields;
+ private final ArrayList<WeldField<?, ?>> fields;
// The map from annotation type to abstracted field with annotation
- private final SetMultimap<Class<? extends Annotation>, WeldField<?, ?>> annotatedFields;
+ private final ArrayListMultimap<Class<? extends Annotation>, WeldField<?, ?>> annotatedFields;
// The set of abstracted fields
- private final Set<WeldField<?, ?>> declaredFields;
+ private final ArrayList<WeldField<?, ?>> declaredFields;
private final Map<String, WeldField<?, ?>> declaredFieldsByName;
// The map from annotation type to abstracted field with annotation
- private final SetMultimap<Class<? extends Annotation>, WeldField<?, ? super T>> declaredAnnotatedFields;
+ private final ArrayListMultimap<Class<? extends Annotation>, WeldField<?, ? super T>> declaredAnnotatedFields;
// The map from annotation type to abstracted field with meta-annotation
- private final SetMultimap<Class<? extends Annotation>, WeldField<?, ?>> declaredMetaAnnotatedFields;
+ private final ArrayListMultimap<Class<? extends Annotation>, WeldField<?, ?>> declaredMetaAnnotatedFields;
// The set of abstracted methods
- private final Set<WeldMethod<?, ?>> methods;
+ private final ArrayList<WeldMethod<?, ?>> methods;
private final Map<MethodSignature, WeldMethod<?, ?>> declaredMethodsBySignature;
private final Map<MethodSignature, WeldMethod<?, ?>> methodsBySignature;
// The map from annotation type to abstracted method with annotation
- private final SetMultimap<Class<? extends Annotation>, WeldMethod<?, ?>> annotatedMethods;
+ private final ArrayListMultimap<Class<? extends Annotation>, WeldMethod<?, ?>> annotatedMethods;
// The set of abstracted methods
- private final Set<WeldMethod<?, ?>> declaredMethods;
+ private final ArrayList<WeldMethod<?, ?>> declaredMethods;
// The map from annotation type to abstracted method with annotation
- private final SetMultimap<Class<? extends Annotation>, WeldMethod<?, ? super T>> declaredAnnotatedMethods;
+ private final ArrayListMultimap<Class<? extends Annotation>, WeldMethod<?, ? super T>> declaredAnnotatedMethods;
// The map from annotation type to method with a parameter with annotation
- private final SetMultimap<Class<? extends Annotation>, WeldMethod<?, ? super T>> declaredMethodsByAnnotatedParameters;
+ private final ArrayListMultimap<Class<? extends Annotation>, WeldMethod<?, ? super T>> declaredMethodsByAnnotatedParameters;
// The set of abstracted constructors
- private final Set<AnnotatedConstructor<T>> constructors;
+ private final ArrayList<AnnotatedConstructor<T>> constructors;
private final Map<ConstructorSignature, WeldConstructor<?>> declaredConstructorsBySignature;
// The map from annotation type to abstracted constructor with annotation
- private final SetMultimap<Class<? extends Annotation>, WeldConstructor<T>> annotatedConstructors;
+ private final ArrayListMultimap<Class<? extends Annotation>, WeldConstructor<T>> annotatedConstructors;
// The map from class list to abstracted constructor
private final Map<List<Class<?>>, WeldConstructor<T>> constructorsByArgumentMap;
// The meta-annotation map (annotation type -> set of annotations containing
// meta-annotation) of the item
- private final SetMultimap<Class<? extends Annotation>, Annotation> declaredMetaAnnotationMap;
+ private final ArrayListMultimap<Class<? extends Annotation>, Annotation> declaredMetaAnnotationMap;
private final boolean discovered;
@@ -163,12 +161,12 @@
}
// Assign class field information
- this.fields = new HashSet<WeldField<?, ?>>();
- this.annotatedFields = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WeldField<?, ?>>>(), HashSetSupplier.<WeldField<?, ?>> instance());
- this.declaredFields = new HashSet<WeldField<?, ?>>();
+ this.fields = new ArrayList<WeldField<?, ?>>();
+ this.annotatedFields = ArrayListMultimap.<Class<? extends Annotation>, WeldField<?, ?>> create();
+ this.declaredFields = new ArrayList<WeldField<?, ?>>(rawType.getDeclaredFields().length);
this.declaredFieldsByName = new HashMap<String, WeldField<?, ?>>();
- this.declaredAnnotatedFields = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WeldField<?, ? super T>>>(), HashSetSupplier.<WeldField<?, ? super T>> instance());
- this.declaredMetaAnnotatedFields = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WeldField<?, ?>>>(), HashSetSupplier.<WeldField<?, ?>> instance());
+ this.declaredAnnotatedFields = ArrayListMultimap.<Class<? extends Annotation>, WeldField<?, ? super T>> create();
+ this.declaredMetaAnnotatedFields = ArrayListMultimap.<Class<? extends Annotation>, WeldField<?, ?>> create();
if (annotatedType == null)
{
@@ -226,11 +224,15 @@
}
}
}
+ this.fields.trimToSize();
+ this.declaredFields.trimToSize();
+ this.declaredAnnotatedFields.trimToSize();
+ this.declaredMetaAnnotatedFields.trimToSize();
// Assign constructor information
- this.constructors = new HashSet<AnnotatedConstructor<T>>();
+ this.constructors = new ArrayList<AnnotatedConstructor<T>>();
this.constructorsByArgumentMap = new HashMap<List<Class<?>>, WeldConstructor<T>>();
- this.annotatedConstructors = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WeldConstructor<T>>>(), HashSetSupplier.<WeldConstructor<T>> instance());
+ this.annotatedConstructors = ArrayListMultimap.<Class<? extends Annotation>, WeldConstructor<T>> create();
this.declaredConstructorsBySignature = new HashMap<ConstructorSignature, WeldConstructor<?>>();
if (annotatedType == null)
@@ -265,13 +267,15 @@
mapConstructorAnnotations(annotatedConstructors, weldConstructor);
}
}
+ this.constructors.trimToSize();
+ this.annotatedConstructors.trimToSize();
// Assign method information
- this.methods = new HashSet<WeldMethod<?, ?>>();
- this.annotatedMethods = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WeldMethod<?, ?>>>(), HashSetSupplier.<WeldMethod<?, ?>> instance());
- this.declaredMethods = new HashSet<WeldMethod<?, ?>>();
- this.declaredAnnotatedMethods = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WeldMethod<?, ? super T>>>(), HashSetSupplier.<WeldMethod<?, ? super T>> instance());
- this.declaredMethodsByAnnotatedParameters = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WeldMethod<?,? super T>>>(), HashSetSupplier.<WeldMethod<?, ? super T>> instance());
+ this.methods = new ArrayList<WeldMethod<?, ?>>();
+ this.annotatedMethods = ArrayListMultimap.<Class<? extends Annotation>, WeldMethod<?, ?>> create();
+ this.declaredMethods = new ArrayList<WeldMethod<?, ?>>();
+ this.declaredAnnotatedMethods = ArrayListMultimap.<Class<? extends Annotation>, WeldMethod<?, ? super T>> create();
+ this.declaredMethodsByAnnotatedParameters = ArrayListMultimap.<Class<? extends Annotation>, WeldMethod<?, ? super T>> create();
this.declaredMethodsBySignature = new HashMap<MethodSignature, WeldMethod<?, ?>>();
this.methodsBySignature = new HashMap<MethodSignature, WeldMethod<?, ?>>();
@@ -342,8 +346,12 @@
}
}
}
+ this.methods.trimToSize();
+ this.annotatedMethods.trimToSize();
+ this.declaredAnnotatedMethods.trimToSize();
+ this.declaredMethodsByAnnotatedParameters.trimToSize();
- this.declaredMetaAnnotationMap = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<Annotation>>(), HashSetSupplier.<Annotation> instance());
+ this.declaredMetaAnnotationMap = ArrayListMultimap.<Class<? extends Annotation>, Annotation> create();
for (Annotation declaredAnnotation : declaredAnnotationMap.values())
{
addMetaAnnotations(declaredMetaAnnotationMap, declaredAnnotation, declaredAnnotation.annotationType().getAnnotations(), true);
@@ -393,26 +401,28 @@
*
* @return The set of abstracted fields
*/
- public Set<WeldField<?, ?>> getWeldFields()
+ public Collection<WeldField<?, ?>> getWeldFields()
{
- return Collections.unmodifiableSet(fields);
+ return Collections.unmodifiableCollection(fields);
}
- public Set<WeldField<?, ?>> getDeclaredFields()
+ public Collection<WeldField<?, ?>> getDeclaredFields()
{
- return Collections.unmodifiableSet(declaredFields);
+ return Collections.unmodifiableCollection(declaredFields);
}
+ @SuppressWarnings("unchecked")
public <F> WeldField<F, ?> getDeclaredWeldField(String fieldName)
{
return (WeldField<F, ?>) declaredFieldsByName.get(fieldName);
}
- public Set<WeldField<?, ? super T>> getDeclaredWeldFields(Class<? extends Annotation> annotationType)
+ public Collection<WeldField<?, ? super T>> getDeclaredWeldFields(Class<? extends Annotation> annotationType)
{
- return Collections.unmodifiableSet(declaredAnnotatedFields.get(annotationType));
+ return Collections.unmodifiableCollection(declaredAnnotatedFields.get(annotationType));
}
+ @SuppressWarnings("unchecked")
public WeldConstructor<T> getDeclaredWeldConstructor(ConstructorSignature signature)
{
return (WeldConstructor<T>) declaredConstructorsBySignature.get(signature);
@@ -427,9 +437,9 @@
* @return A set of matching abstracted fields, null if none are found.
*
*/
- public Set<WeldField<?, ?>> getWeldFields(Class<? extends Annotation> annotationType)
+ public Collection<WeldField<?, ?>> getWeldFields(Class<? extends Annotation> annotationType)
{
- return Collections.unmodifiableSet(annotatedFields.get(annotationType));
+ return Collections.unmodifiableCollection(annotatedFields.get(annotationType));
}
public boolean isLocalClass()
@@ -473,14 +483,14 @@
*
* @see org.jboss.weld.introspector.WeldClass#getWeldMethods(Class)
*/
- public Set<WeldMethod<?, ?>> getWeldMethods(Class<? extends Annotation> annotationType)
+ public Collection<WeldMethod<?, ?>> getWeldMethods(Class<? extends Annotation> annotationType)
{
- return Collections.unmodifiableSet(annotatedMethods.get(annotationType));
+ return Collections.unmodifiableCollection(annotatedMethods.get(annotationType));
}
- public Set<WeldMethod<?, ? super T>> getDeclaredWeldMethods(Class<? extends Annotation> annotationType)
+ public Collection<WeldMethod<?, ? super T>> getDeclaredWeldMethods(Class<? extends Annotation> annotationType)
{
- return Collections.unmodifiableSet(declaredAnnotatedMethods.get(annotationType));
+ return Collections.unmodifiableCollection(declaredAnnotatedMethods.get(annotationType));
}
/**
@@ -493,9 +503,9 @@
*
* @see org.jboss.weld.introspector.WeldClass#getWeldConstructors(Class)
*/
- public Set<WeldConstructor<T>> getWeldConstructors(Class<? extends Annotation> annotationType)
+ public Collection<WeldConstructor<T>> getWeldConstructors(Class<? extends Annotation> annotationType)
{
- return Collections.unmodifiableSet(annotatedConstructors.get(annotationType));
+ return Collections.unmodifiableCollection(annotatedConstructors.get(annotationType));
}
public WeldConstructor<T> getNoArgsWeldConstructor()
@@ -503,9 +513,9 @@
return constructorsByArgumentMap.get(Collections.emptyList());
}
- public Set<WeldMethod<?, ? super T>> getDeclaredWeldMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
+ public Collection<WeldMethod<?, ? super T>> getDeclaredWeldMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
{
- return Collections.unmodifiableSet(declaredMethodsByAnnotatedParameters.get(annotationType));
+ return Collections.unmodifiableCollection(declaredMethodsByAnnotatedParameters.get(annotationType));
}
public WeldMethod<?, ?> getWeldMethod(Method methodDescriptor)
@@ -521,9 +531,9 @@
return null;
}
- public Set<WeldMethod<?, ?>> getWeldMethods()
+ public Collection<WeldMethod<?, ?>> getWeldMethods()
{
- return Collections.unmodifiableSet(methods);
+ return Collections.unmodifiableCollection(methods);
}
public WeldMethod<?, ?> getDeclaredWeldMethod(Method method)
@@ -539,7 +549,7 @@
return null;
}
- public Set<WeldMethod<?, ?>> getDeclaredWeldMethods()
+ public Collection<WeldMethod<?, ?>> getDeclaredWeldMethods()
{
return declaredMethods;
}
@@ -660,26 +670,28 @@
return (S) object;
}
+ @SuppressWarnings("unchecked")
public Set<AnnotatedConstructor<T>> getConstructors()
{
- return constructors;
+ return new HashSet(constructors);
}
@SuppressWarnings("unchecked")
public Set<AnnotatedField<? super T>> getFields()
{
- return (Set) fields;
+ return new HashSet(fields);
}
@SuppressWarnings("unchecked")
public Set<AnnotatedMethod<? super T>> getMethods()
{
- return (Set) methods;
+ return new HashSet(methods);
}
+ @SuppressWarnings("unchecked")
public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
{
- return Collections.unmodifiableSet(declaredMetaAnnotationMap.get(metaAnnotationType));
+ return Collections.unmodifiableSet(new HashSet(declaredMetaAnnotationMap.get(metaAnnotationType)));
}
public boolean isDiscovered()
Modified: core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldMethodImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldMethodImpl.java 2010-05-10 14:26:25 UTC (rev 6223)
+++ core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldMethodImpl.java 2010-05-10 16:58:39 UTC (rev 6224)
@@ -22,9 +22,7 @@
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collection;
import java.util.Collections;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -40,13 +38,11 @@
import org.jboss.weld.logging.messages.ReflectionMessage;
import org.jboss.weld.resources.ClassTransformer;
import org.jboss.weld.util.Names;
-import org.jboss.weld.util.collections.ArrayListSupplier;
import org.jboss.weld.util.reflection.HierarchyDiscovery;
import org.jboss.weld.util.reflection.Reflections;
import org.jboss.weld.util.reflection.SecureReflections;
-import com.google.common.collect.ListMultimap;
-import com.google.common.collect.Multimaps;
+import com.google.common.collect.ArrayListMultimap;
/**
* Represents an annotated method
@@ -64,10 +60,10 @@
private final Method method;
// The abstracted parameters
- private final List<WeldParameter<?, X>> parameters;
+ private final ArrayList<WeldParameter<?, X>> parameters;
// A mapping from annotation type to parameter abstraction with that
// annotation present
- private final ListMultimap<Class<? extends Annotation>, WeldParameter<?, X>> annotatedParameters;
+ private final ArrayListMultimap<Class<? extends Annotation>, WeldParameter<?, X>> annotatedParameters;
// The property name
private final String propertyName;
@@ -99,7 +95,7 @@
super(annotationMap, declaredAnnotationMap, classTransformer, method, rawType, type, typeClosure, declaringClass);
this.method = method;
this.parameters = new ArrayList<WeldParameter<?, X>>();
- this.annotatedParameters = Multimaps.newListMultimap(new HashMap<Class<? extends Annotation>, Collection<WeldParameter<?, X>>>(), ArrayListSupplier.<WeldParameter<?, X>>instance());
+ this.annotatedParameters = ArrayListMultimap.<Class<? extends Annotation>, WeldParameter<?, X>> create();
if (annotatedMethod == null)
{
@@ -151,8 +147,9 @@
}
}
+ this.parameters.trimToSize();
+ this.annotatedParameters.trimToSize();
-
String propertyName = Reflections.getPropertyName(getDelegate());
if (propertyName == null)
Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java 2010-05-10 14:26:25 UTC (rev 6223)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java 2010-05-10 16:58:39 UTC (rev 6224)
@@ -241,7 +241,7 @@
List<WeldMethod<?, ? super T>> methods = new ArrayList<WeldMethod<?, ? super T>>();
while (!t.getJavaClass().equals(Object.class))
{
- Set<WeldMethod<?, ? super T>> declaredMethods = (Set) t.getDeclaredWeldMethods(PostConstruct.class);
+ Collection<WeldMethod<?, ? super T>> declaredMethods = (Collection) t.getDeclaredWeldMethods(PostConstruct.class);
log.trace(FOUND_POST_CONSTRUCT_METHODS, declaredMethods, type);
if (declaredMethods.size() > 1)
{
@@ -264,7 +264,7 @@
List<WeldMethod<?, ? super T>> methods = new ArrayList<WeldMethod<?, ? super T>>();
while (!t.getJavaClass().equals(Object.class))
{
- Set<WeldMethod<?, ? super T>> declaredMethods = (Set) t.getDeclaredWeldMethods(PreDestroy.class);
+ Collection<WeldMethod<?, ? super T>> declaredMethods = (Collection) t.getDeclaredWeldMethods(PreDestroy.class);
log.trace(FOUND_PRE_DESTROY_METHODS, declaredMethods, type);
if (declaredMethods.size() > 1)
{
@@ -685,7 +685,7 @@
public static <T> ConstructorInjectionPoint<T> getBeanConstructor(Bean<T> declaringBean, WeldClass<T> type)
{
ConstructorInjectionPoint<T> constructor = null;
- Set<WeldConstructor<T>> initializerAnnotatedConstructors = type.getWeldConstructors(Inject.class);
+ Collection<WeldConstructor<T>> initializerAnnotatedConstructors = type.getWeldConstructors(Inject.class);
log.trace(FOUND_INJECTABLE_CONSTRUCTORS, initializerAnnotatedConstructors, type);
if (initializerAnnotatedConstructors.size() > 1)
{
Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/reflection/HierarchyDiscovery.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/reflection/HierarchyDiscovery.java 2010-05-10 14:26:25 UTC (rev 6223)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/reflection/HierarchyDiscovery.java 2010-05-10 16:58:39 UTC (rev 6224)
@@ -22,6 +22,7 @@
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
import java.security.AccessControlException;
+import java.util.HashSet;
import java.util.Map;
import java.util.Set;
@@ -53,9 +54,10 @@
{
init();
}
- return types.keySet();
+ // Return an independent set with no ties to the BiMap used
+ return new HashSet<Type>(types.keySet());
}
-
+
public Map<Class<?>, Type> getTypeMap()
{
if (types == null)
@@ -64,7 +66,7 @@
}
return types.inverse();
}
-
+
private void init()
{
this.types = HashBiMap.create();
13 years, 12 months
Weld SVN: r6223 - cdi-tck/branches/1.0/impl/src/main/resources.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-05-10 10:26:25 -0400 (Mon, 10 May 2010)
New Revision: 6223
Modified:
cdi-tck/branches/1.0/impl/src/main/resources/tck-tests-released.xml
Log:
CDITCK-155, CDITCK-156
Modified: cdi-tck/branches/1.0/impl/src/main/resources/tck-tests-released.xml
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/resources/tck-tests-released.xml 2010-05-10 12:57:19 UTC (rev 6222)
+++ cdi-tck/branches/1.0/impl/src/main/resources/tck-tests-released.xml 2010-05-10 14:26:25 UTC (rev 6223)
@@ -140,6 +140,20 @@
<exclude name="testDelegateTypeVariableBeanTypeVariable" />
</methods>
</class>
+
+ <!-- CDITCK-155 -->
+ <class name="org.jboss.jsr299.tck.tests.context.request.ejb.EJBRequestContextTest">
+ <methods>
+ <exclude name="testRequestScopeDestroyedAfterCallToEjbTimeoutMethod" />
+ </methods>
+ </class>
+
+ <!-- CDITCK-156 -->
+ <class name="org.jboss.jsr299.tck.tests.context.application.ejb.ApplicationContextSharedTest">
+ <methods>
+ <exclude name="testApplicationContextShared" />
+ </methods>
+ </class>
<!-- Issues in Weld (the RI) -->
13 years, 12 months
Weld SVN: r6222 - cdi-tck/branches/1.0/impl/src/main/resources.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-05-10 08:57:19 -0400 (Mon, 10 May 2010)
New Revision: 6222
Modified:
cdi-tck/branches/1.0/impl/src/main/resources/tck-tests-released.xml
Log:
CDITCK-139
Modified: cdi-tck/branches/1.0/impl/src/main/resources/tck-tests-released.xml
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/resources/tck-tests-released.xml 2010-05-10 11:56:26 UTC (rev 6221)
+++ cdi-tck/branches/1.0/impl/src/main/resources/tck-tests-released.xml 2010-05-10 12:57:19 UTC (rev 6222)
@@ -134,6 +134,12 @@
</methods>
</class>
+ <!-- CDITCK-139 -->
+ <class name="org.jboss.jsr299.tck.tests.decorators.resolution.DecoratorResolutionTest">
+ <methods>
+ <exclude name="testDelegateTypeVariableBeanTypeVariable" />
+ </methods>
+ </class>
<!-- Issues in Weld (the RI) -->
13 years, 12 months
Weld SVN: r6221 - cdi-tck/branches/1.0/impl/src/main/resources.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-05-10 07:56:26 -0400 (Mon, 10 May 2010)
New Revision: 6221
Modified:
cdi-tck/branches/1.0/impl/src/main/resources/tck-tests-released.xml
Log:
CDITCK-153
Modified: cdi-tck/branches/1.0/impl/src/main/resources/tck-tests-released.xml
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/resources/tck-tests-released.xml 2010-05-08 19:54:09 UTC (rev 6220)
+++ cdi-tck/branches/1.0/impl/src/main/resources/tck-tests-released.xml 2010-05-10 11:56:26 UTC (rev 6221)
@@ -126,7 +126,16 @@
<exclude name="test" />
</methods>
</class>
+
+ <!-- CDITCK-153 -->
+ <class name="org.jboss.jsr299.tck.tests.implementation.producer.method.definition.enterprise.EnterpriseProducerMethodDefinitionTest">
+ <methods>
+ <exclude name="testNonStaticProducerMethodInheritedBySpecializingSubclass" />
+ </methods>
+ </class>
+
+
<!-- Issues in Weld (the RI) -->
<!-- WELD-401 -->
13 years, 12 months