openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r736355 - /incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java
Date Wed, 21 Jan 2009 17:54:05 GMT
Author: struberg
Date: Wed Jan 21 09:54:04 2009
New Revision: 736355

URL: http://svn.apache.org/viewvc?rev=736355&view=rev
Log:
OWB-57 remove unnecessary class cast and instanceof

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

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java?rev=736355&r1=736354&r2=736355&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java
Wed Jan 21 09:54:04 2009
@@ -185,13 +185,10 @@
                     }
                     else
                     {
-                        if (apiType instanceof Class)
+                        if (ClassUtil.isAssignable(apiType, componentApiType))
                         {
-                            if (ClassUtil.isAssignable((Class<?>) apiType, componentApiType))
-                            {
-                                results.add((Bean<T>) component);
-                                break;
-                            }
+                            results.add((Bean<T>) component);
+                            break;
                         }
                     }
                 }



Mime
View raw message