You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2006/12/27 14:18:33 UTC

svn commit: r490499 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/PoolableProxyHandler.java

Author: cziegeler
Date: Wed Dec 27 05:18:32 2006
New Revision: 490499

URL: http://svn.apache.org/viewvc?view=rev&rev=490499
Log:
Prevent NPE :)

Modified:
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/PoolableProxyHandler.java

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/PoolableProxyHandler.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/PoolableProxyHandler.java?view=diff&rev=490499&r1=490498&r2=490499
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/PoolableProxyHandler.java (original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/PoolableProxyHandler.java Wed Dec 27 05:18:32 2006
@@ -47,7 +47,7 @@
     throws Throwable {
         if ( method.getName().equals("putBackIntoAvalonPool") ) {
             this.run();
-            RequestContextHolder.getRequestAttributes().removeAttribute(this.attributeName, RequestAttributes.SCOPE_REQUEST);
+            RequestContextHolder.currentRequestAttributes().removeAttribute(this.attributeName, RequestAttributes.SCOPE_REQUEST);
             return null;
         }
         if ( method.getName().equals("hashCode") && args == null ) {
@@ -55,7 +55,7 @@
         }
         if ( this.componentHolder.get() == null ) {
             this.componentHolder.set(this.handler.getFromPool());
-            RequestContextHolder.getRequestAttributes().registerDestructionCallback(this.attributeName, this, RequestAttributes.SCOPE_REQUEST);
+            RequestContextHolder.currentRequestAttributes().registerDestructionCallback(this.attributeName, this, RequestAttributes.SCOPE_REQUEST);
         }
         try {
             return method.invoke(this.componentHolder.get(), args);