You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by st...@apache.org on 2014/09/29 10:35:02 UTC
svn commit: r1628135 -
/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/ProducerMethodProducer.java
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)