openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1624078 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
Date Wed, 10 Sep 2014 17:54:59 GMT
Author: rmannibucau
Date: Wed Sep 10 17:54:59 2014
New Revision: 1624078

URL: http://svn.apache.org/r1624078
Log:
@Inject Interceptor should only be for interceptors

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

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java?rev=1624078&r1=1624077&r2=1624078&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
Wed Sep 10 17:54:59 2014
@@ -1670,6 +1670,13 @@ public final class WebBeansUtil
             {
                 throw new DefinitionException("@Inject Decorator<X> only supported
in decorators");
             }
+            if (injectionPoint.getQualifiers().contains(DefaultLiteral.INSTANCE)
+                    && ParameterizedType.class.isInstance(injectionPoint.getType())
+                    && Interceptor.class == ParameterizedType.class.cast(injectionPoint.getType()).getRawType()
+                    && !isInterceptor)
+            {
+                throw new DefinitionException("@Inject Interceptor<X> only supported
in interceptors");
+            }
         }
     }
 



Mime
View raw message