openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r891954 - /incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
Date Thu, 17 Dec 2009 22:19:39 GMT
Author: gerdogdu
Date: Thu Dec 17 22:19:38 2009
New Revision: 891954

URL: http://svn.apache.org/viewvc?rev=891954&view=rev
Log:
[OWB-199] Bug in ProducerMethod primitive return type resolution

Modified:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java?rev=891954&r1=891953&r2=891954&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
Thu Dec 17 22:19:38 2009
@@ -770,7 +770,20 @@
         }
         else if (beanType instanceof Class && requiredType instanceof Class)
         {
-            return requiredType.equals(beanType);
+            Class<?> clzBeanType = (Class<?>)beanType;
+            Class<?> clzReqType = (Class<?>)requiredType;
+            
+            if(clzBeanType.isPrimitive())
+            {
+                clzBeanType = getPrimitiveWrapper(clzBeanType);
+            }
+            
+            if(clzReqType.isPrimitive())
+            {
+                clzReqType = getPrimitiveWrapper(clzReqType);
+            }
+            
+            return clzReqType.equals(clzBeanType);
         }
         else if(beanType instanceof ParameterizedType && requiredType instanceof
Class)
         {



Mime
View raw message