wink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r995594 - /incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/utils/GenericsUtils.java
Date Thu, 09 Sep 2010 22:12:34 GMT
Author: bluk
Date: Thu Sep  9 22:12:34 2010
New Revision: 995594

URL: http://svn.apache.org/viewvc?rev=995594&view=rev
Log:
Fix GenericsUtils.isAssignable() to handle primitives

Thanks to Raymond Feng for the patch.

See [WINK-312]

Modified:
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/utils/GenericsUtils.java

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/utils/GenericsUtils.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/utils/GenericsUtils.java?rev=995594&r1=995593&r2=995594&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/utils/GenericsUtils.java
(original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/utils/GenericsUtils.java
Thu Sep  9 22:12:34 2010
@@ -86,7 +86,7 @@ public class GenericsUtils {
         } else {
             if (type instanceof GenericArrayType == false) {
                 Class<?> classType = getClassType(type);
-                if (classType.isAssignableFrom(cls)) {
+                if (classType == Object.class || classType.isAssignableFrom(cls)) {
                     return true;
                 }
             }



Mime
View raw message