openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1623532 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
Date Mon, 08 Sep 2014 19:55:44 GMT
Author: rmannibucau
Date: Mon Sep  8 19:55:43 2014
New Revision: 1623532

URL: http://svn.apache.org/r1623532
Log:
validating @Inject Decorator is done in decorators

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=1623532&r1=1623531&r2=1623532&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
Mon Sep  8 19:55:43 2014
@@ -19,6 +19,7 @@
 package org.apache.webbeans.util;
 
 import org.apache.webbeans.annotation.AnnotationManager;
+import org.apache.webbeans.annotation.DefaultLiteral;
 import org.apache.webbeans.annotation.NewLiteral;
 import org.apache.webbeans.component.AbstractOwbBean;
 import org.apache.webbeans.component.AbstractProducerBean;
@@ -1661,6 +1662,14 @@ public final class WebBeansUtil
                     delegateFound = true;
                 }
             }
+
+            if (injectionPoint.getQualifiers().contains(DefaultLiteral.INSTANCE)
+                    && ParameterizedType.class.isInstance(injectionPoint.getType())
+                    && javax.enterprise.inject.spi.Decorator.class == ParameterizedType.class.cast(injectionPoint.getType()).getRawType()
+                    && !isDecorator)
+            {
+                throw new DefinitionException("@Inject Decorator<X> only supported
in decorators");
+            }
         }
     }
 



Mime
View raw message