openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlmonte...@apache.org
Subject svn commit: r1612257 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
Date Mon, 21 Jul 2014 12:44:18 GMT
Author: jlmonteiro
Date: Mon Jul 21 12:44:17 2014
New Revision: 1612257

URL: http://svn.apache.org/r1612257
Log:
OWB-986 CreationalContextImpl.toString throws NullPointerException. Thanks Andy.

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java?rev=1612257&r1=1612256&r2=1612257&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
Mon Jul 21 12:44:17 2014
@@ -18,6 +18,16 @@
  */
 package org.apache.webbeans.context.creational;
 
+import org.apache.webbeans.config.WebBeansContext;
+import org.apache.webbeans.exception.WebBeansException;
+import org.apache.webbeans.util.Asserts;
+import org.apache.webbeans.util.WebBeansUtil;
+
+import javax.enterprise.context.spi.Contextual;
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.EventMetadata;
+import javax.enterprise.inject.spi.InjectionPoint;
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
@@ -27,17 +37,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Stack;
 
-import javax.enterprise.context.spi.Contextual;
-import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.EventMetadata;
-import javax.enterprise.inject.spi.InjectionPoint;
-
-import org.apache.webbeans.config.WebBeansContext;
-import org.apache.webbeans.exception.WebBeansException;
-import org.apache.webbeans.util.Asserts;
-import org.apache.webbeans.util.WebBeansUtil;
-
 /** {@inheritDoc} */
 public class CreationalContextImpl<T> implements CreationalContext<T>, Serializable
 {
@@ -374,7 +373,10 @@ public class CreationalContextImpl<T> im
 
         final StringBuilder sb = new StringBuilder("CreationalContext{name=");
 
-        sb.append(bean.getBeanClass().getSimpleName());
+        if (bean != null && bean.getBeanClass() != null)
+        {
+            sb.append(bean.getBeanClass().getSimpleName());
+        }
 
         return sb.append("}").toString();
     }



Mime
View raw message