Commits

ltor...@81dbac14-341a-0410-aa85-cbcd92e6f43e  committed 622260c

Avoid NPE after resetting the result
Submitted by: Lars Torunski

  • Participants
  • Parent commits 5ea9127

Comments (0)

Files changed (1)

File 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