Author: struberg
Date: Thu Jul 11 13:20:14 2019
New Revision: 1862924
URL: http://svn.apache.org/viewvc?rev=1862924&view=rev
Log:
OWB-1294 disable implicitInjectionPoint be default
OWB-1287 introduced a feature which will pick up fields as InjectionPoints
even if they do not have any @Inject annotation.
Turned out that this has some side effects on a few projects.
Mainly if the field is managed by some other framework than CDI
like JAX-RS or Mockito.
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/service/DefaultInjectionPointService.java
openwebbeans/trunk/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/service/DefaultInjectionPointService.java
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/service/DefaultInjectionPointService.java?rev=1862924&r1=1862923&r2=1862924&view=diff
==============================================================================
---
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/service/DefaultInjectionPointService.java
(original)
+++
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/service/DefaultInjectionPointService.java
Thu Jul 11 13:20:14 2019
@@ -51,8 +51,7 @@ public class DefaultInjectionPointServic
public DefaultInjectionPointService(final WebBeansContext context)
{
this.manager = context.getBeanManagerImpl();
- this.implicitSupport =
Boolean.parseBoolean(context.getOpenWebBeansConfiguration().getProperty(
- DefaultInjectionPointService.class.getName() +
".implicitSupport"));
+ this.implicitSupport =
Boolean.parseBoolean(context.getOpenWebBeansConfiguration().getProperty(DefaultInjectionPointService.class.getName()
+ ".implicitSupport"));
this.delegates =
ofNullable(context.getOpenWebBeansConfiguration().getProperty(
DefaultInjectionPointService.class.getName() +
".delegateClasses"))
.map(Stream::of)
Modified:
openwebbeans/trunk/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans.properties?rev=1862924&r1=1862923&r2=1862924&view=diff
==============================================================================
---
openwebbeans/trunk/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
(original)
+++
openwebbeans/trunk/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
Thu Jul 11 13:20:14 2019
@@ -151,6 +151,14 @@ org.apache.webbeans.web.eagerSessionInit
# org.apache.webbeans.ignoredExtensions=org.acme.FooExtension
################################################################################################
+############################### Implicit Injection Points
######################################
+# By default CDI requires to use the @javax.inject.Inject annotation on any
injection point.
+# OpenWebBeans supports a smarter mode by automatically enable fields as
injection points
+# if they have a valid Qualifier.
+# This feature is off by default for performance reasons
+org.apache.webbeans.service.DefaultInjectionPointService..implicitSupport=false
+################################################################################################
+
######################### Bean Scanning
########################################################
# A list of known JARs/paths which should not be scanned for beans