openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1072630 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: container/InjectionResolver.java jms/JMSModel.java
Date Sun, 20 Feb 2011 16:49:22 GMT
Author: struberg
Date: Sun Feb 20 16:49:21 2011
New Revision: 1072630

URL: http://svn.apache.org/viewvc?rev=1072630&view=rev
Log:
OWB-461 cleanup: use known size for toArray

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jms/JMSModel.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java?rev=1072630&r1=1072629&r2=1072630&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java
Sun Feb 20 16:49:21 2011
@@ -225,8 +225,9 @@ public class InjectionResolver
         {
             clazz = (Class<?>) type;
         }
-        
-        Annotation[] qualifiers = injectionPoint.getQualifiers().toArray(new Annotation[0]);
       
+
+        Set<Annotation> qualSet = injectionPoint.getQualifiers();
+        Annotation[] qualifiers = qualSet.toArray(new Annotation[qualSet.size()]);
         if(isInstanceOrEventInjection(type))
         {
             qualifiers = new Annotation[1];

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jms/JMSModel.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jms/JMSModel.java?rev=1072630&r1=1072629&r2=1072630&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jms/JMSModel.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jms/JMSModel.java Sun
Feb 20 16:49:21 2011
@@ -57,7 +57,7 @@ public class JMSModel
     
     public Annotation[] getBindings()
     {
-        return bindings.toArray(new Annotation[0]);
+        return bindings.toArray(new Annotation[bindings.size()]);
     }
 
     /**



Mime
View raw message