cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r555254 - /cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/spring/ServletFactoryBean.java
Date Wed, 11 Jul 2007 12:33:00 GMT
Author: felixk
Date: Wed Jul 11 05:32:58 2007
New Revision: 555254

URL: http://svn.apache.org/viewvc?view=rev&rev=555254
Log:
Interface says: Return the type of object that this FactoryBean creates, or null if not known
in advance.

This fixes errors like:
(support.DefaultListableBeanFactory  565 ) FactoryBean threw exception from getObjectType,
despite the contract saying that it should return null if the type of its object cannot be
determined yet
java.lang.NullPointerException
        at org.apache.cocoon.servletservice.spring.ServletFactoryBean.getObjectType(ServletFactoryBean.java:209)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:558)

Modified:
    cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/spring/ServletFactoryBean.java

Modified: cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/spring/ServletFactoryBean.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/spring/ServletFactoryBean.java?view=diff&rev=555254&r1=555253&r2=555254
==============================================================================
--- cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/spring/ServletFactoryBean.java
(original)
+++ cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/spring/ServletFactoryBean.java
Wed Jul 11 05:32:58 2007
@@ -204,7 +204,7 @@
      * @see org.springframework.beans.factory.FactoryBean#getObjectType()
      */
     public Class getObjectType() {
-        return this.embeddedServlet.getClass();
+        return this.embeddedServlet != null ? this.embeddedServlet.getClass() : null;
     }
 
     /* (non-Javadoc)



Mime
View raw message