diff options
author | Artur Signell <artur.signell@itmill.com> | 2009-01-02 14:40:19 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2009-01-02 14:40:19 +0000 |
commit | d9a13c237889ba32830edb27ad34c4d9ea2f180b (patch) | |
tree | d1bda61bf6de5b5b3724eb99f2618861fb45abcb /src/com/itmill/toolkit/automatedtests | |
parent | 19636fc0509e45d3bcedf4d7ba92670fdea4630d (diff) | |
download | vaadin-framework-d9a13c237889ba32830edb27ad34c4d9ea2f180b.tar.gz vaadin-framework-d9a13c237889ba32830edb27ad34c4d9ea2f180b.zip |
Cleaned up the whole project
svn changeset:6398/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/automatedtests')
5 files changed, 17 insertions, 8 deletions
diff --git a/src/com/itmill/toolkit/automatedtests/SimplestApplication.java b/src/com/itmill/toolkit/automatedtests/SimplestApplication.java index a81e1daa1a..01f3990bd2 100644 --- a/src/com/itmill/toolkit/automatedtests/SimplestApplication.java +++ b/src/com/itmill/toolkit/automatedtests/SimplestApplication.java @@ -9,6 +9,7 @@ import com.itmill.toolkit.ui.Window; public class SimplestApplication extends com.itmill.toolkit.Application { + @Override public void init() { final Window main = new Window("Simplest Application window"); setMainWindow(main); diff --git a/src/com/itmill/toolkit/automatedtests/robustness/Robustness.java b/src/com/itmill/toolkit/automatedtests/robustness/Robustness.java index c8034e2677..14026aecd1 100644 --- a/src/com/itmill/toolkit/automatedtests/robustness/Robustness.java +++ b/src/com/itmill/toolkit/automatedtests/robustness/Robustness.java @@ -33,6 +33,7 @@ public abstract class Robustness extends com.itmill.toolkit.Application RandomComponents randomComponents = new RandomComponents(); + @Override public void init() { createNewView(); } @@ -61,9 +62,9 @@ public abstract class Robustness extends com.itmill.toolkit.Application } public void buttonClick(ClickEvent event) { - if (event.getButton() == create) + if (event.getButton() == create) { create(); - else if (event.getButton() == remove) { + } else if (event.getButton() == remove) { main.removeAllComponents(); close.removeListener(this); remove.removeListener(this); diff --git a/src/com/itmill/toolkit/automatedtests/robustness/RobustnessComplex.java b/src/com/itmill/toolkit/automatedtests/robustness/RobustnessComplex.java index 4f9325693d..1770cdd141 100644 --- a/src/com/itmill/toolkit/automatedtests/robustness/RobustnessComplex.java +++ b/src/com/itmill/toolkit/automatedtests/robustness/RobustnessComplex.java @@ -14,13 +14,15 @@ public class RobustnessComplex extends Robustness implements /** * Create complex layouts with components and listeners. */ + @Override public void create() { count++; // remove old stressLayout, all dependant components should be now // allowed for garbage collection. - if (stressLayout != null) + if (stressLayout != null) { main.removeComponent(stressLayout); + } // create new stress layout stressLayout = randomComponents diff --git a/src/com/itmill/toolkit/automatedtests/util/Log.java b/src/com/itmill/toolkit/automatedtests/util/Log.java index 43c0efe9df..8d113e0fe5 100644 --- a/src/com/itmill/toolkit/automatedtests/util/Log.java +++ b/src/com/itmill/toolkit/automatedtests/util/Log.java @@ -68,10 +68,11 @@ public class Log { String clazz = st[3].getClassName() + ".java"; key = "(" + clazz + ":" + line + ")" + " " + methodName; Integer value = (Integer) classMethodCallCounter.get(key); - if (value == null) + if (value == null) { value = new Integer(1); - else + } else { value = new Integer(value.intValue() + 1); + } classMethodCallCounter.put(key, value); return value.intValue() + ": " + key; } catch (Exception e) { @@ -93,10 +94,11 @@ public class Log { public void add(int type, String message) { String source = getSource(); if (type >= debug) { - if (showClassInformation) + if (showClassInformation) { System.out.println(source + ": " + message); - else + } else { System.out.println(message); + } } } diff --git a/src/com/itmill/toolkit/automatedtests/util/StatusServlet.java b/src/com/itmill/toolkit/automatedtests/util/StatusServlet.java index e13102ea73..9912b23d1b 100644 --- a/src/com/itmill/toolkit/automatedtests/util/StatusServlet.java +++ b/src/com/itmill/toolkit/automatedtests/util/StatusServlet.java @@ -55,11 +55,13 @@ public class StatusServlet extends HttpServlet { VERSION_BUILD = digits[2]; } + @Override public void init(javax.servlet.ServletConfig servletConfig) throws javax.servlet.ServletException { super.init(servletConfig); } + @Override protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Writer w = response.getWriter(); @@ -72,8 +74,9 @@ public class StatusServlet extends HttpServlet { String p = ""; p += "<p>StatusServlet " + dfHuman.format(new Date()) + "</p>"; - for (int i = 0; i < 30; i++) + for (int i = 0; i < 30; i++) { System.gc(); + } long inUse = (Runtime.getRuntime().totalMemory() - Runtime.getRuntime() .freeMemory()); p += "<p>Memory:<br />\n<memused>" + inUse |