openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1628912 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/GenericsUtil.java
Date Thu, 02 Oct 2014 09:35:59 GMT
Author: rmannibucau
Date: Thu Oct  2 09:35:59 2014
New Revision: 1628912

URL: http://svn.apache.org/r1628912
Log:
minor cleanup (useless param/method)

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

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/GenericsUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/GenericsUtil.java?rev=1628912&r1=1628911&r2=1628912&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/GenericsUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/GenericsUtil.java
Thu Oct  2 09:35:59 2014
@@ -101,7 +101,7 @@ public final class GenericsUtil
     {
         if (beanType instanceof Class)
         {
-            return isAssignableFrom(isDelegateOrEvent, injectionPointType, (Class<?>)beanType);
+            return isAssignableFrom(injectionPointType, (Class<?>)beanType);
         }
         else if (beanType instanceof TypeVariable)
         {
@@ -117,7 +117,7 @@ public final class GenericsUtil
         }
         else if (beanType instanceof WildcardType)
         {
-            return isAssignableFrom(isDelegateOrEvent, false, (Type)injectionPointType, (WildcardType)beanType);
+            return isAssignableFrom(isDelegateOrEvent, (Type)injectionPointType, (WildcardType)beanType);
         }
         else
         {
@@ -125,7 +125,7 @@ public final class GenericsUtil
         }
     }
 
-    private static boolean isAssignableFrom(boolean isDelegateOrEvent, Class<?> injectionPointType,
Class<?> beanType)
+    private static boolean isAssignableFrom(Class<?> injectionPointType, Class<?>
beanType)
     {
         return ClassUtil.isClassAssignable(injectionPointType, beanType);
     }
@@ -179,7 +179,7 @@ public final class GenericsUtil
         return injectionPointType.isArray() && isAssignableFrom(isDelegateOrEvent,
injectionPointType.getComponentType(), beanType.getGenericComponentType());
     }
     
-    private static boolean isAssignableFrom(boolean isDelegateOrEvent, boolean isProducer,
Type injectionPointType, WildcardType beanType)
+    private static boolean isAssignableFrom(boolean isDelegateOrEvent, Type injectionPointType,
WildcardType beanType)
     {
         for (Type bounds: beanType.getLowerBounds())
         {
@@ -210,11 +210,11 @@ public final class GenericsUtil
         }
         else if (beanType instanceof ParameterizedType)
         {
-            return isAssignableFrom(isDelegateOrEvent, isProducer, injectionPointType, (ParameterizedType)beanType);
+            return isAssignableFrom(isDelegateOrEvent, injectionPointType, (ParameterizedType)beanType);
         }
         else if (beanType instanceof WildcardType)
         {
-            return isAssignableFrom(isDelegateOrEvent, isProducer, (Type)injectionPointType,
(WildcardType)beanType);
+            return isAssignableFrom(isDelegateOrEvent, injectionPointType, (WildcardType)beanType);
         }
         else if (beanType instanceof GenericArrayType)
         {
@@ -284,7 +284,7 @@ public final class GenericsUtil
     /**
      * CDI Spec. 5.2.4
      */
-    private static boolean isAssignableFrom(boolean isDelegateOrEvent, boolean isProducer,
ParameterizedType injectionPointType, ParameterizedType beanType)
+    private static boolean isAssignableFrom(boolean isDelegateOrEvent, ParameterizedType
injectionPointType, ParameterizedType beanType)
     {
         if (injectionPointType.getRawType() != beanType.getRawType())
         {
@@ -716,30 +716,6 @@ public final class GenericsUtil
         return false;
     }
 
-    public static boolean hasBoundParameters(final ParameterizedType pt)
-    {
-        final Type[] typeParameters = pt.getActualTypeArguments();
-        if (typeParameters == null || typeParameters.length == 0)
-        {
-            return false;
-        }
-        for (final Type tv : typeParameters)
-        {
-            if (TypeVariable.class.isInstance(tv))
-            {
-                if (!isNotBound(TypeVariable.class.cast(tv).getBounds()))
-                {
-                    return true;
-                }
-            }
-            else
-            {
-                return true;
-            }
-        }
-        return false;
-    }
-
     public static ParameterizedType getParameterizedType(Type type)
     {
         if (type instanceof ParameterizedType)



Mime
View raw message