openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1798820 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util: InjectionExceptionUtil.java WebBeansUtil.java
Date Thu, 15 Jun 2017 11:51:25 GMT
Author: struberg
Date: Thu Jun 15 11:51:25 2017
New Revision: 1798820

URL: http://svn.apache.org/viewvc?rev=1798820&view=rev
Log:
OWB-1182 fix check for valid ct in isManagedBean

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/InjectionExceptionUtil.java
    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/InjectionExceptionUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/InjectionExceptionUtil.java?rev=1798820&r1=1798819&r2=1798820&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/InjectionExceptionUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/InjectionExceptionUtil.java
Thu Jun 15 11:51:25 2017
@@ -82,7 +82,7 @@ public class InjectionExceptionUtil
         }
 
         ViolationMessageBuilder violationMessage = newViolation("There is more than one Bean
",
-                classString != null ? "with type " + classString : ""
+                classString != null ? "with type " + classString + " " : ""
                 , qualifierMessage);
 
         if (injectionPoint != null)

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=1798820&r1=1798819&r2=1798820&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
Thu Jun 15 11:51:25 2017
@@ -397,9 +397,10 @@ public final class WebBeansUtil
     {
         Class<?> clazz = annotatedType.getJavaClass();
 
-        if (getNoArgConstructor(clazz) != null)
+        Constructor<?> defaultCt = getNoArgConstructor(clazz);
+        if (defaultCt != null && !Modifier.isPrivate(defaultCt.getModifiers()))
         {
-            // if we have a default ct, then all is fine in any case
+            // if we have an accessible default ct, then all is fine in any case
             return true;
         }
 



Mime
View raw message