Author: rmannibucau
Date: Sat Jun 28 18:36:10 2014
New Revision: 1606382
URL: http://svn.apache.org/r1606382
Log:
removing CDI11s which was here before 2.x
Removed:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/CDI11s.java
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InterceptorBean.java
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorResolutionService.java
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/InjectionTargetImpl.java
openwebbeans/trunk/webbeans-tck/testng-dev.xml
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InterceptorBean.java
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InterceptorBean.java?rev=1606382&r1=1606381&r2=1606382&view=diff
==============================================================================
---
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InterceptorBean.java
(original)
+++
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InterceptorBean.java
Sat Jun 28 18:36:10 2014
@@ -34,7 +34,6 @@ import javax.enterprise.inject.spi.BeanA
import org.apache.webbeans.config.WebBeansContext;
import org.apache.webbeans.container.InjectionTargetFactoryImpl;
import org.apache.webbeans.container.InterceptorInjectionTargetFactory;
-import org.apache.webbeans.util.CDI11s;
import org.apache.webbeans.util.ExceptionUtil;
/**
@@ -133,7 +132,8 @@ public abstract class InterceptorBean<T>
@Override
public boolean intercepts(InterceptionType interceptionType)
{
- return interceptionMethods.containsKey(interceptionType) ||
(interceptionType.equals(CDI11s.AROUND_CONSTRUCT) && aroundConstructMethod !=
null);
+ return interceptionMethods.containsKey(interceptionType)
+ || (interceptionType == InterceptionType.AROUND_CONSTRUCT &&
aroundConstructMethod != null);
}
@Override
@@ -141,7 +141,7 @@ public abstract class InterceptorBean<T>
{
try
{
- if (interceptionType.equals(CDI11s.AROUND_CONSTRUCT) &&
aroundConstructMethod != null)
+ if (InterceptionType.AROUND_CONSTRUCT == interceptionType &&
aroundConstructMethod != null)
{
return aroundConstructMethod.invoke(instance,
invocationContext);
}
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorResolutionService.java
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorResolutionService.java?rev=1606382&r1=1606381&r2=1606382&view=diff
==============================================================================
---
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorResolutionService.java
(original)
+++
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorResolutionService.java
Sat Jun 28 18:36:10 2014
@@ -29,12 +29,12 @@ import org.apache.webbeans.container.Bea
import org.apache.webbeans.exception.WebBeansConfigurationException;
import org.apache.webbeans.util.AnnotationUtil;
import org.apache.webbeans.util.Asserts;
-import org.apache.webbeans.util.CDI11s;
import org.apache.webbeans.util.ClassUtil;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.enterprise.inject.spi.Annotated;
+import javax.enterprise.inject.spi.AnnotatedCallable;
import javax.enterprise.inject.spi.AnnotatedMethod;
import javax.enterprise.inject.spi.AnnotatedParameter;
import javax.enterprise.inject.spi.AnnotatedType;
@@ -212,10 +212,7 @@ public class InterceptorResolutionServic
allUsedCdiInterceptors.addAll(beanManagerImpl.resolveInterceptors(InterceptionType.POST_CONSTRUCT,
interceptorBindings));
allUsedCdiInterceptors.addAll(beanManagerImpl.resolveInterceptors(InterceptionType.PRE_DESTROY,
interceptorBindings));
- if (CDI11s.AROUND_CONSTRUCT != null)
- {
-
allUsedCdiInterceptors.addAll(beanManagerImpl.resolveInterceptors(CDI11s.AROUND_CONSTRUCT,
interceptorBindings));
- }
+
allUsedCdiInterceptors.addAll(beanManagerImpl.resolveInterceptors(InterceptionType.AROUND_CONSTRUCT,
interceptorBindings));
}
}
@@ -299,7 +296,7 @@ public class InterceptorResolutionServic
}
private void calculateEjbMethodInterceptors(BusinessMethodInterceptorInfo
methodInterceptorInfo, Set<Interceptor<?>> allUsedEjbInterceptors,
- List<Interceptor<?>>
classLevelEjbInterceptors, AnnotatedMethod annotatedMethod)
+ List<Interceptor<?>>
classLevelEjbInterceptors, AnnotatedCallable annotatedMethod)
{
boolean unproxyable = isUnproxyable(annotatedMethod);
@@ -326,7 +323,7 @@ public class InterceptorResolutionServic
}
}
- private boolean isUnproxyable(AnnotatedMethod annotatedMethod)
+ private boolean isUnproxyable(AnnotatedCallable annotatedMethod)
{
int modifiers = annotatedMethod.getJavaMember().getModifiers();
return Modifier.isFinal(modifiers) || Modifier.isPrivate(modifiers);
@@ -466,7 +463,7 @@ public class InterceptorResolutionServic
private void calculateCdiMethodInterceptors(BusinessMethodInterceptorInfo
methodInterceptorInfo,
InterceptionType
interceptionType,
Set<Interceptor<?>>
allUsedCdiInterceptors,
- AnnotatedMethod
annotatedMethod,
+ AnnotatedCallable
annotatedMethod,
Set<Annotation>
classInterceptorBindings)
{
AnnotationManager annotationManager =
webBeansContext.getAnnotationManager();
@@ -590,8 +587,8 @@ public class InterceptorResolutionServic
*/
public static class BeanInterceptorInfo
{
- public BeanInterceptorInfo(List<Decorator<?>> decorators,
- LinkedHashSet<Interceptor<?>>
ejbInterceptors,
+
+ public BeanInterceptorInfo(List<Decorator<?>> decorators,
LinkedHashSet<Interceptor<?>> ejbInterceptors,
List<Interceptor<?>> cdiInterceptors,
SelfInterceptorBean<?> selfInterceptorBean,
Map<Method, BusinessMethodInterceptorInfo>
businessMethodsInfo,
@@ -634,19 +631,19 @@ public class InterceptorResolutionServic
* For each business method which is either decorated or intercepted
we keep an entry.
* If there is no entry then the method has neither a decorator nor an
interceptor.
*/
- private Map<Method, BusinessMethodInterceptorInfo> businessMethodsInfo
= new HashMap<Method, BusinessMethodInterceptorInfo>();
+ private Map<Method, BusinessMethodInterceptorInfo> businessMethodsInfo;
/**
* all non-intercepted methods
*/
- private List<Method> nonInterceptedMethods = Collections.EMPTY_LIST;
+ private List<Method> nonInterceptedMethods;
/**
* Contains info about lifecycle methods.
* A method can be a 'business method' when invoked via the user but a
* 'lifecycle method' while invoked by the container!
*/
- private Map<InterceptionType, LifecycleMethodInfo>
lifecycleMethodInterceptorInfos = Collections.EMPTY_MAP;
+ private Map<InterceptionType, LifecycleMethodInfo>
lifecycleMethodInterceptorInfos;
public List<Decorator<?>> getDecorators()
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/InjectionTargetImpl.java
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/InjectionTargetImpl.java?rev=1606382&r1=1606381&r2=1606382&view=diff
==============================================================================
---
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/InjectionTargetImpl.java
(original)
+++
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/InjectionTargetImpl.java
Sat Jun 28 18:36:10 2014
@@ -36,7 +36,6 @@ import org.apache.webbeans.proxy.Interce
import org.apache.webbeans.proxy.OwbInterceptorProxy;
import org.apache.webbeans.spi.ResourceInjectionService;
import org.apache.webbeans.util.Asserts;
-import org.apache.webbeans.util.CDI11s;
import org.apache.webbeans.util.ExceptionUtil;
import javax.enterprise.context.spi.CreationalContext;
@@ -129,14 +128,7 @@ public class InjectionTargetImpl<T> exte
preDestroyInterceptors
= getLifecycleInterceptors(interceptorInfo.getEjbInterceptors(),
interceptorInfo.getCdiInterceptors(), InterceptionType.PRE_DESTROY);
- if (CDI11s.AROUND_CONSTRUCT != null)
- {
- aroundConstructInterceptors =
getLifecycleInterceptors(interceptorInfo.getEjbInterceptors(),
interceptorInfo.getCdiInterceptors(), CDI11s.AROUND_CONSTRUCT);
- }
- else
- {
- aroundConstructInterceptors = new ArrayList<Interceptor<?>>();
- }
+ aroundConstructInterceptors =
getLifecycleInterceptors(interceptorInfo.getEjbInterceptors(),
interceptorInfo.getCdiInterceptors(), InterceptionType.AROUND_CONSTRUCT);
}
@Override
@@ -148,7 +140,7 @@ public class InjectionTargetImpl<T> exte
{
final Constructor<T> cons = getConstructor().getJavaMember();
final InjectableConstructor<T> injectableConstructor = new
InjectableConstructor<T>(cons, this, creationalContext);
- return (T)new InterceptorInvocationContext<T>(null,
CDI11s.AROUND_CONSTRUCT, aroundConstructInterceptors, interceptorInstances,
+ return (T)new InterceptorInvocationContext<T>(null,
InterceptionType.AROUND_CONSTRUCT, aroundConstructInterceptors,
interceptorInstances,
cons,
injectableConstructor.createParameters()).proceed();
}
catch (final Exception e) // CDI 1.0
Modified: openwebbeans/trunk/webbeans-tck/testng-dev.xml
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tck/testng-dev.xml?rev=1606382&r1=1606381&r2=1606382&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-tck/testng-dev.xml (original)
+++ openwebbeans/trunk/webbeans-tck/testng-dev.xml Sat Jun 28 18:36:10 2014
@@ -15,20 +15,21 @@
the specific language governing permissions and limitations under the
License.
-->
-<suite name="JSR-346-TCK" verbose="2" configfailurepolicy="continue" >
- <listeners>
- <listener
class-name="org.jboss.cdi.tck.impl.testng.SingleTestClassMethodInterceptor"/>
- <listener
class-name="org.jboss.cdi.tck.impl.testng.ProgressLoggingTestListener"/>
- </listeners>
- <test name="JSR-346 TCK">
- <groups>
- <run>
- <exclude name="integration" />
- <exclude name="javaee-full" />
- </run>
- </groups>
- <classes>
- <class
name="org.jboss.cdi.tck.tests.extensions.beanManager.beanAttributes.CreateBeanAttributesTest"
/>
- </classes>
- </test>
+<suite name="JSR-346-TCK" verbose="2" configfailurepolicy="continue">
+ <test name="JSR-346 TCK">
+ <classes>
+ <class
+
name="org.jboss.cdi.tck.interceptors.tests.contract.interceptorLifeCycle.aroundConstruct.AroundConstructLifeCycleTest"/>
+ </classes>
+ <groups>
+ <run>
+ <exclude name="integration"/>
+ <exclude name="javaee-full"/>
+ </run>
+ </groups>
+ </test>
+ <listeners>
+ <listener
class-name="org.jboss.cdi.tck.impl.testng.SingleTestClassMethodInterceptor"/>
+ <listener
class-name="org.jboss.cdi.tck.impl.testng.ProgressLoggingTestListener"/>
+ </listeners>
</suite>