Commits

Anonymous committed 622260c

Avoid NPE after resetting the result
Submitted by: Lars Torunski

Comments (0)

Files changed (1)

src/java/com/opensymphony/oscache/web/filter/CacheHttpServletResponseWrapper.java

         if (!isCommitted()) {
             super.reset();
             cachedWriter = null;
-            result = null;
+            result = new ResponseContent();
             cacheOut = null;
             fragment = false;
             status = SC_OK;
         if (!isCommitted()) {
             super.resetBuffer();
             cachedWriter = null;
-            result = null;
+            result = new ResponseContent();
             cacheOut = null;
             fragment = false;
             // The resetBuffer method clears content in the buffer if the