openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1628135 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/ProducerMethodProducer.java
Date Mon, 29 Sep 2014 08:35:02 GMT
Author: struberg
Date: Mon Sep 29 08:35:01 2014
New Revision: 1628135

URL: http://svn.apache.org/r1628135
Log:
OWB-1012 ProducerMethodProducer must throw IllegalArgumentException instead of NPE  

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/ProducerMethodProducer.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/ProducerMethodProducer.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/ProducerMethodProducer.java?rev=1628135&r1=1628134&r2=1628135&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/ProducerMethodProducer.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/ProducerMethodProducer.java
Mon Sep 29 08:35:01 2014
@@ -53,7 +53,10 @@ public class ProducerMethodProducer<T, P
         Asserts.assertNotNull(producerMethod, "method may not be null");
         if (!producerMethod.isStatic())
         {
-            Asserts.assertNotNull(owner, "owner may not be null for non-static producer method");
+            if (owner == null)
+            {
+                throw new IllegalArgumentException("owner may not be null for non-static
producer method " + producerMethod);
+            }
         }
         final OpenWebBeansEjbPlugin ejbPlugin = webBeansContext.getPluginLoader().getEjbPlugin();
         if (ejbPlugin != null)



Mime
View raw message