From: Henri Sara Date: Tue, 10 Apr 2012 10:49:00 +0000 (+0300) Subject: Close all URLConnections, not only Java6 specific FileURLConnection. X-Git-Tag: 7.0.0.alpha2~103 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=06e9398f651278103e7e1333e4944827d191e2ab;p=vaadin-framework.git Close all URLConnections, not only Java6 specific FileURLConnection. --- diff --git a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java index 9f1691112b..c295e05ed7 100644 --- a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java +++ b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java @@ -35,8 +35,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import sun.net.www.protocol.file.FileURLConnection; - import com.vaadin.Application; import com.vaadin.Application.ApplicationStartEvent; import com.vaadin.Application.SystemMessages; @@ -1146,7 +1144,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements "Failed to find out last modified timestamp. Continuing without it.", e); } finally { - if (connection instanceof FileURLConnection) { + if (connection instanceof URLConnection) { try { // Explicitly close the input stream to prevent it // from remaining hanging @@ -1157,7 +1155,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements } } catch (IOException e) { logger.log(Level.INFO, - "Error closing FileURLConnection input stream", e); + "Error closing URLConnection input stream", e); } } }