From: Jouni Koivuviita Date: Wed, 24 Oct 2007 09:36:20 +0000 (+0000) Subject: Java 1.4.2 compliance. X-Git-Tag: 6.7.0.beta1~5783 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=04f1d95e813e3f2b9bf4151c1c2809e6957d0ece;p=vaadin-framework.git Java 1.4.2 compliance. svn changeset:2587/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/terminal/gwt/server/CommunicationManager.java b/src/com/itmill/toolkit/terminal/gwt/server/CommunicationManager.java index 58e3d08333..6b1e54f4a1 100644 --- a/src/com/itmill/toolkit/terminal/gwt/server/CommunicationManager.java +++ b/src/com/itmill/toolkit/terminal/gwt/server/CommunicationManager.java @@ -64,7 +64,6 @@ import org.apache.commons.fileupload.FileItemStream; import org.apache.commons.fileupload.FileUploadException; import org.apache.commons.fileupload.ProgressListener; import org.apache.commons.fileupload.servlet.ServletFileUpload; -import org.apache.commons.fileupload.util.Streams; import com.itmill.toolkit.Application; import com.itmill.toolkit.Application.WindowAttachEvent; @@ -410,7 +409,7 @@ public class CommunicationManager implements Paintable.RepaintRequestListener, Paintable f = (Paintable) application.consumeFocus(); if (f != null) { if (metaOpen) - outWriter.append(","); + outWriter.write(","); outWriter.write("\"focus\":\"" + getPaintableId(f) + "\""); } @@ -435,10 +434,10 @@ public class CommunicationManager implements Paintable.RepaintRequestListener, try { is = applicationServlet .getServletContext() - .getResourceAsStream("/"+ - ApplicationServlet.THEME_DIRECTORY_PATH - + themeName - + "/" + .getResourceAsStream( + "/" + + ApplicationServlet.THEME_DIRECTORY_PATH + + themeName + "/" + resource); } catch (Exception e) { e.printStackTrace(); @@ -666,10 +665,11 @@ public class CommunicationManager implements Paintable.RepaintRequestListener, // or // milliseconds // We use timeformat to determine 12/24-hour clock - boolean twelve_hour_clock = timeformat.contains("a"); + boolean twelve_hour_clock = timeformat.indexOf("a") > -1; // TODO there are other possibilities as well, like 'h' in french // (ignore them, too complicated) - String hour_min_delimiter = timeformat.contains(".") ? "." : ":"; + String hour_min_delimiter = timeformat.indexOf(".") > -1 ? "." + : ":"; // outWriter.print("\"tf\":\"" + timeformat + "\","); outWriter.print("\"thc\":" + twelve_hour_clock + ","); outWriter.print("\"hmd\":\"" + hour_min_delimiter + "\""); @@ -918,11 +918,13 @@ public class CommunicationManager implements Paintable.RepaintRequestListener, public synchronized Set getDirtyComponents() { HashSet resultset = new HashSet(dirtyPaintabletSet); - // The following algorithm removes any components that would be painted as - // a direct descendant of other components from the dirty components list. + // The following algorithm removes any components that would be painted + // as + // a direct descendant of other components from the dirty components + // list. // The result is that each component should be painted exactly once and // any unmodified components will be painted as "cached=true". - + for (Iterator i = dirtyPaintabletSet.iterator(); i.hasNext();) { Paintable p = (Paintable) i.next(); if (p instanceof Component) {