You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2006/08/22 23:05:17 UTC

svn commit: r433752 - /cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/source/impl/CachingSource.java

Author: vgritsenko
Date: Tue Aug 22 14:05:17 2006
New Revision: 433752

URL: http://svn.apache.org/viewvc?rev=433752&view=rev
Log:
add TODO, clear response on dispose.

Modified:
    cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/source/impl/CachingSource.java

Modified: cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/source/impl/CachingSource.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/source/impl/CachingSource.java?rev=433752&r1=433751&r2=433752&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/source/impl/CachingSource.java (original)
+++ cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/source/impl/CachingSource.java Tue Aug 22 14:05:17 2006
@@ -76,6 +76,8 @@
                            implements Serviceable, Initializable, XMLizable,
                                       Source {
 
+    // TODO: Decouple from eventcache block.
+    
     // ---------------------------------------------------- Constants
 
     public static final String CACHE_EXPIRES_PARAM = "cache-expires";
@@ -198,6 +200,7 @@
      * Cleanup.
      */
     public void dispose() {
+        this.response = null;
         this.source = null;
         this.manager = null;
         this.cache = null;
@@ -347,8 +350,8 @@
     public InputStream getInputStream() throws IOException, SourceException {
         try {
             return new ByteArrayInputStream(getBinaryResponse());
-        } catch (IOException se) {
-            throw new SourceException("Failure getting input stream", se);
+        } catch (IOException e) {
+            throw new SourceException("Failure getting input stream", e);
         }
     }