From 06e9398f651278103e7e1333e4944827d191e2ab Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Tue, 10 Apr 2012 13:49:00 +0300 Subject: [PATCH] Close all URLConnections, not only Java6 specific FileURLConnection. --- .../terminal/gwt/server/AbstractApplicationServlet.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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); } } } -- 2.39.5