Author: mgrigorov
Date: Fri Dec 16 14:15:04 2011
New Revision: 1215138

URL: http://svn.apache.org/viewvc?rev=1215138&view=rev
Log:
WICKET-4293
UrlResourceStream closes incorrect InputStream causing stacktraces on undeploy 
on GlassFish


Modified:
    
wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/util/resource/UrlResourceStream.java

Modified: 
wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/util/resource/UrlResourceStream.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/util/resource/UrlResourceStream.java?rev=1215138&r1=1215137&r2=1215138&view=diff
==============================================================================
--- 
wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/util/resource/UrlResourceStream.java
 (original)
+++ 
wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/util/resource/UrlResourceStream.java
 Fri Dec 16 14:15:04 2011
@@ -69,7 +69,14 @@ public class UrlResourceStream extends A
        {
                private URLConnection connection;
 
-               /** The streams read from this connection */
+               /**
+                * The streams read from this connection.
+                * Some URLConnection implementations return the same instance 
of InputStream
+                * every time URLConnection#getInputStream() is called. Other 
return a new instance
+                * of InputStream.
+                * Here we keep a list of all returned ones and close them in 
UrlResourceStream#close().
+                * Even it is the same instance several times we will try to 
close it quietly several times.
+                */
                private List<InputStream> inputStreams;
 
                /** Length of stream. */


Reply via email to