Revision: 1480
          http://stripes.svn.sourceforge.net/stripes/?rev=1480&view=rev
Author:   bengunter
Date:     2012-03-14 18:45:31 +0000 (Wed, 14 Mar 2012)
Log Message:
-----------
Debug output was throwing NPE when a bean was not found by name.

Modified Paths:
--------------
    
trunk/stripes/src/net/sourceforge/stripes/integration/spring/SpringHelper.java

Modified: 
trunk/stripes/src/net/sourceforge/stripes/integration/spring/SpringHelper.java
===================================================================
--- 
trunk/stripes/src/net/sourceforge/stripes/integration/spring/SpringHelper.java  
    2012-03-05 16:19:23 UTC (rev 1479)
+++ 
trunk/stripes/src/net/sourceforge/stripes/integration/spring/SpringHelper.java  
    2012-03-14 18:45:31 UTC (rev 1480)
@@ -262,9 +262,11 @@
                                            boolean allowFindByType) {
         // First try to lookup using the name provided
         try {
-            Object bean =  ctx.getBean(name, type);
-            log.debug("Found spring bean with name [", name, "] and type [",
-                      bean.getClass().getName(), "]");
+            Object bean = ctx.getBean(name, type);
+            if (bean != null) {
+                log.debug("Found spring bean with name [", name, "] and type 
[", bean.getClass()
+                        .getName(), "]");
+            }
             return bean;
         }
         catch (NestedRuntimeException nre) {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to