]> source.dussan.org Git - vaadin-framework.git/commitdiff
Global code cleanup 16/316/1
authorLeif Åstrand <leif@vaadin.com>
Wed, 21 Nov 2012 11:45:18 +0000 (13:45 +0200)
committerLeif Åstrand <leif@vaadin.com>
Wed, 21 Nov 2012 11:45:18 +0000 (13:45 +0200)
Change-Id: I14f46e6aa4f9cbdd9037f1c4ad1ac38fe7cbda86

57 files changed:
client/src/com/vaadin/client/ApplicationConnection.java
client/src/com/vaadin/client/Util.java
client/src/com/vaadin/client/VCaption.java
client/src/com/vaadin/client/ui/AbstractComponentConnector.java
client/src/com/vaadin/client/ui/VFilterSelect.java
client/src/com/vaadin/client/ui/VFormLayout.java
client/src/com/vaadin/client/ui/VPopupView.java
client/src/com/vaadin/client/ui/VScrollTable.java
client/src/com/vaadin/client/ui/button/ButtonConnector.java
client/src/com/vaadin/client/ui/popupview/VisibilityChangeEvent.java
client/src/com/vaadin/client/ui/richtextarea/RichTextAreaConnector.java
client/src/com/vaadin/client/ui/textfield/TextFieldConnector.java
client/src/com/vaadin/client/ui/treetable/TreeTableConnector.java
server/src/com/vaadin/event/ShortcutAction.java
server/src/com/vaadin/server/AbstractCommunicationManager.java
server/src/com/vaadin/server/DefaultSystemMessagesProvider.java
server/src/com/vaadin/server/ServletPortletHelper.java
server/src/com/vaadin/server/VaadinPortlet.java
server/src/com/vaadin/ui/AbstractComponent.java
server/src/com/vaadin/ui/LegacyComponent.java
server/src/com/vaadin/ui/UI.java
server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java
server/tests/src/com/vaadin/tests/VaadinClasses.java
server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java
server/tests/src/com/vaadin/tests/server/navigator/UriFragmentManagerTest.java
shared/src/com/vaadin/shared/ApplicationConstants.java
shared/src/com/vaadin/shared/ui/popupview/PopupViewServerRpc.java
theme-compiler/src/com/vaadin/sass/tree/controldirective/IfElseDefNode.java
theme-compiler/src/com/vaadin/sass/visitor/BlockNodeHandler.java
uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java
uitest/src/com/vaadin/tests/ListenerOrder.java
uitest/src/com/vaadin/tests/Parameters.java
uitest/src/com/vaadin/tests/appengine/GAESyncTest.java
uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java
uitest/src/com/vaadin/tests/application/TerminalErrorNotification.java
uitest/src/com/vaadin/tests/application/ThreadLocalInstances.java
uitest/src/com/vaadin/tests/components/AbstractComponentTest.java
uitest/src/com/vaadin/tests/components/HierarchyChangeForRemovedComponentContainers.java
uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java
uitest/src/com/vaadin/tests/components/button/ShortCutListenerModification.java
uitest/src/com/vaadin/tests/components/combobox/GridLayoutComboBoxZoomOut.java
uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldTextEnabled.java
uitest/src/com/vaadin/tests/components/orderedlayout/InsertComponentInHorizontalLayout.java
uitest/src/com/vaadin/tests/components/table/PropertyValueChange.java
uitest/src/com/vaadin/tests/components/tabsheet/TabsheetShouldUpdateHeight.java
uitest/src/com/vaadin/tests/components/tree/TreeIconUpdate.java
uitest/src/com/vaadin/tests/components/ui/InitialFragmentEvent.java
uitest/src/com/vaadin/tests/components/ui/UIsInMultipleTabs.java
uitest/src/com/vaadin/tests/minitutorials/v7a1/IntegerTextFieldDataSource.java
uitest/src/com/vaadin/tests/tickets/Ticket1365.java
uitest/src/com/vaadin/tests/tickets/Ticket1589.java
uitest/src/com/vaadin/tests/tickets/Ticket1921.java
uitest/src/com/vaadin/tests/tickets/Ticket2292.java
uitest/src/com/vaadin/tests/tickets/Ticket34.java
uitest/src/com/vaadin/tests/util/LargeContainer.java
uitest/src/com/vaadin/tests/util/RangeCollection.java
uitest/src/com/vaadin/tests/util/SampleDirectory.java

index 4e243495709fd8feb3269fb73a671ccb1ee2d07c..8bfd7ee74776a8742f6c6b456e7d09717e5e3bdb 100644 (file)
@@ -83,8 +83,8 @@ import com.vaadin.client.ui.VNotification.HideEvent;
 import com.vaadin.client.ui.dd.VDragAndDropManager;
 import com.vaadin.client.ui.ui.UIConnector;
 import com.vaadin.client.ui.window.WindowConnector;
-import com.vaadin.shared.ApplicationConstants;
 import com.vaadin.shared.AbstractComponentState;
+import com.vaadin.shared.ApplicationConstants;
 import com.vaadin.shared.Version;
 import com.vaadin.shared.communication.LegacyChangeVariablesInvocation;
 import com.vaadin.shared.communication.MethodInvocation;
@@ -2890,7 +2890,8 @@ public class ApplicationConnection {
      * @return true if at least one listener has been registered on server side
      *         for the event identified by eventIdentifier.
      * @deprecated as of Vaadin 7. Use
-     *             {@link AbstractComponentState#hasEventListener(String)} instead
+     *             {@link AbstractComponentState#hasEventListener(String)}
+     *             instead
      */
     @Deprecated
     public boolean hasEventListeners(ComponentConnector paintable,
@@ -2990,7 +2991,8 @@ public class ApplicationConnection {
 
     /**
      * @deprecated as of Vaadin 7. Use
-     *             {@link AbstractComponentState#hasEventListener(String)} instead
+     *             {@link AbstractComponentState#hasEventListener(String)}
+     *             instead
      */
     @Deprecated
     public boolean hasEventListeners(Widget widget, String eventIdentifier) {
index 7548cfe42afb3e3e16aa481d7d6309f3a16b02ed..a5ee78befb1045cd75613a3088cb2432dbe0b174 100644 (file)
@@ -44,8 +44,8 @@ import com.google.gwt.user.client.ui.RootPanel;
 import com.google.gwt.user.client.ui.Widget;
 import com.vaadin.client.RenderInformation.FloatSize;
 import com.vaadin.client.ui.VOverlay;
-import com.vaadin.shared.ApplicationConstants;
 import com.vaadin.shared.AbstractComponentState;
+import com.vaadin.shared.ApplicationConstants;
 import com.vaadin.shared.communication.MethodInvocation;
 import com.vaadin.shared.ui.ComponentStateUtil;
 
index a662ef4a7bb3ed0068db52f7f4c205deb25e4720..390fe9d00f73c94d1df3fef326c68c11ceb2ae2f 100644 (file)
@@ -22,9 +22,9 @@ import com.google.gwt.user.client.Event;
 import com.google.gwt.user.client.ui.HTML;
 import com.vaadin.client.ui.AbstractFieldConnector;
 import com.vaadin.client.ui.Icon;
+import com.vaadin.shared.AbstractComponentState;
 import com.vaadin.shared.AbstractFieldState;
 import com.vaadin.shared.ComponentConstants;
-import com.vaadin.shared.AbstractComponentState;
 import com.vaadin.shared.ui.ComponentStateUtil;
 
 public class VCaption extends HTML {
index 9868bc329d25285dfb247518e5fd65b6b48c5644..cda6e8f369caf24ff83461ce9811c0b41d45dd14 100644 (file)
@@ -40,8 +40,8 @@ import com.vaadin.client.metadata.Type;
 import com.vaadin.client.metadata.TypeData;
 import com.vaadin.client.ui.datefield.PopupDateFieldConnector;
 import com.vaadin.client.ui.ui.UIConnector;
-import com.vaadin.shared.ComponentConstants;
 import com.vaadin.shared.AbstractComponentState;
+import com.vaadin.shared.ComponentConstants;
 import com.vaadin.shared.Connector;
 import com.vaadin.shared.ui.ComponentStateUtil;
 import com.vaadin.shared.ui.TabIndexState;
index bca68a86f345be4fa09c30a45845b4105dd42aaa..d7e354a6fa64c975471e9b1be7064d2e072226e6 100644 (file)
@@ -598,7 +598,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
          * @param componentState
          *            shared state of the combo box
          */
-        public void updateStyleNames(UIDL uidl, AbstractComponentState componentState) {
+        public void updateStyleNames(UIDL uidl,
+                AbstractComponentState componentState) {
             setStyleName(VFilterSelect.this.getStylePrimaryName()
                     + "-suggestpopup");
             menu.setStyleName(VFilterSelect.this.getStylePrimaryName()
index 49c991b39c4206cc1e4b37ce42ea3750a31c4769..62499bd9733e9531d590185dec97cc825fda218c 100644 (file)
@@ -34,8 +34,8 @@ import com.vaadin.client.ComponentConnector;
 import com.vaadin.client.Focusable;
 import com.vaadin.client.StyleConstants;
 import com.vaadin.client.VTooltip;
-import com.vaadin.shared.ComponentConstants;
 import com.vaadin.shared.AbstractComponentState;
+import com.vaadin.shared.ComponentConstants;
 import com.vaadin.shared.ui.ComponentStateUtil;
 import com.vaadin.shared.ui.MarginInfo;
 
@@ -65,7 +65,8 @@ public class VFormLayout extends SimplePanel {
      * @param enabled
      * @return An array of stylenames
      */
-    private String[] getStylesFromState(AbstractComponentState state, boolean enabled) {
+    private String[] getStylesFromState(AbstractComponentState state,
+            boolean enabled) {
         List<String> styles = new ArrayList<String>();
         if (ComponentStateUtil.hasStyles(state)) {
             for (String name : state.styles) {
index 129e233d5e9e507a8c2fa0d6a68164a1190edfde..a8cdc59f9c1f399893a47bd8df652a26440fd184 100644 (file)
@@ -391,6 +391,7 @@ public class VPopupView extends HTML implements Iterable<Widget> {
                 VisibilityChangeEvent.getType());
     }
 
+    @Override
     public Iterator<Widget> iterator() {
         return Collections.singleton((Widget) popup).iterator();
     }
index 9b06b711cbeadfdd056578ea8880b21da530d71c..55ad5331326b365cc27122e43e9ca17f8b197131 100644 (file)
@@ -1113,8 +1113,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
     }
 
     /** For internal use only. May be removed or replaced in the future. */
-    public void updateSelectionProperties(UIDL uidl, AbstractComponentState state,
-            boolean readOnly) {
+    public void updateSelectionProperties(UIDL uidl,
+            AbstractComponentState state, boolean readOnly) {
         setMultiSelectMode(uidl.hasAttribute("multiselectmode") ? uidl
                 .getIntAttribute("multiselectmode") : MULTISELECT_MODE_DEFAULT);
 
index f84659ece156279c2047a908e0427db83eea1f27..18913b9b0dd6ce8df9349c57f5ca6450f7ecf391 100644 (file)
@@ -177,6 +177,7 @@ public class ButtonConnector extends AbstractComponentConnector implements
      * com.vaadin.terminal.gwt.client.ui.ShortcutActionTarget#handleAction(com
      * .vaadin.terminal.gwt.client.ui.ShortcutAction)
      */
+    @Override
     public boolean handleAction(ShortcutAction action) {
         if ("click".equals(action.getTargetAction())) {
             getWidget().onClick();
index e2cec40a8fcf3741b928f9c11646781775859d54..929f712459b323d106b2e0017bdb0b0933ce8dd3 100644 (file)
@@ -2,8 +2,7 @@ package com.vaadin.client.ui.popupview;
 
 import com.google.gwt.event.shared.GwtEvent;
 
-public class VisibilityChangeEvent extends
-        GwtEvent<VisibilityChangeHandler> {
+public class VisibilityChangeEvent extends GwtEvent<VisibilityChangeHandler> {
 
     private static Type<VisibilityChangeHandler> TYPE;
 
index 79479fd3ed1696af8d20fa52da5dd9c5ca92a19a..afcf4794993868421ac3f3e80b5a08d61801334c 100644 (file)
@@ -20,8 +20,8 @@ import com.vaadin.client.ApplicationConnection;
 import com.vaadin.client.Paintable;
 import com.vaadin.client.UIDL;
 import com.vaadin.client.ui.AbstractFieldConnector;
-import com.vaadin.client.ui.VRichTextArea;
 import com.vaadin.client.ui.ShortcutActionHandler.BeforeShortcutActionListener;
+import com.vaadin.client.ui.VRichTextArea;
 import com.vaadin.shared.ui.Connect;
 import com.vaadin.shared.ui.Connect.LoadStyle;
 import com.vaadin.ui.RichTextArea;
index 25d6ab836917cf81beab92806198eceb402c3a28..c653b06cf9a6fafe82325ea9ce500dc98e8bca89 100644 (file)
@@ -23,8 +23,8 @@ import com.vaadin.client.ApplicationConnection;
 import com.vaadin.client.Paintable;
 import com.vaadin.client.UIDL;
 import com.vaadin.client.ui.AbstractFieldConnector;
-import com.vaadin.client.ui.VTextField;
 import com.vaadin.client.ui.ShortcutActionHandler.BeforeShortcutActionListener;
+import com.vaadin.client.ui.VTextField;
 import com.vaadin.shared.ui.Connect;
 import com.vaadin.shared.ui.Connect.LoadStyle;
 import com.vaadin.shared.ui.textfield.AbstractTextFieldState;
index 11200f28b7e436f8b4ad7458cad61e18a2482cad..be6e54c5ce679c98dc9aee9b9cb31a522a35b5cb 100644 (file)
@@ -18,8 +18,8 @@ package com.vaadin.client.ui.treetable;
 import com.vaadin.client.ApplicationConnection;
 import com.vaadin.client.UIDL;
 import com.vaadin.client.ui.FocusableScrollPanel;
-import com.vaadin.client.ui.VTreeTable;
 import com.vaadin.client.ui.VScrollTable.VScrollTableBody.VScrollTableRow;
+import com.vaadin.client.ui.VTreeTable;
 import com.vaadin.client.ui.VTreeTable.PendingNavigationEvent;
 import com.vaadin.client.ui.table.TableConnector;
 import com.vaadin.shared.ui.Connect;
index 9d13d41b9f8af90c36b49cceca1df9d9357cd954..29238dfca965a8dff0f72ad93d5da1ccf0e06026 100644 (file)
@@ -20,6 +20,7 @@ import java.io.Serializable;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import com.vaadin.client.ui.ShortcutActionTarget;
 import com.vaadin.server.Resource;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.ComponentContainer;
index 31920b5df658dd34340234ad480b93d368c6b5d8..50150c5d5cc0a529e4b17276d0d5e250a6c8e7b3 100644 (file)
@@ -1328,7 +1328,8 @@ public abstract class AbstractCommunicationManager implements Serializable {
      */
     private void writePerformanceData(final PrintWriter outWriter) {
         outWriter.write(String.format(", \"timings\":[%d, %d]",
-                session.getCumulativeRequestDuration(), session.getLastRequestDuration()));
+                session.getCumulativeRequestDuration(),
+                session.getLastRequestDuration()));
     }
 
     private void legacyPaint(PaintTarget paintTarget,
@@ -2637,8 +2638,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
         String pathInfo = request.getPathInfo();
         // + 2 to also remove beginning and ending slashes
         String fileName = pathInfo
-                .substring(ApplicationConstants.PUBLISHED_FILE_PATH
-                        .length() + 2);
+                .substring(ApplicationConstants.PUBLISHED_FILE_PATH.length() + 2);
 
         final String mimetype = response.getService().getMimeType(fileName);
 
index 7111a8bbbb23c2cbbed20129d82923476a94d966..2d1ff813115a437f4e014f9079b3586c14623a84 100644 (file)
@@ -16,7 +16,6 @@
 
 package com.vaadin.server;
 
-
 /**
  * System messages provider using the built-in default system messages. This
  * singleton is accessed using {@link #get()}.
index 00fdccdeb7f508d8653dcb806136230d88a0f3c2..be5fd1c28799f15785f93522e239d2e316918dd6 100644 (file)
@@ -101,8 +101,8 @@ class ServletPortletHelper implements Serializable {
     }
 
     public static boolean isPublishedFileRequest(VaadinRequest request) {
-        return hasPathPrefix(request,
-                ApplicationConstants.PUBLISHED_FILE_PATH + "/");
+        return hasPathPrefix(request, ApplicationConstants.PUBLISHED_FILE_PATH
+                + "/");
     }
 
     public static boolean isUIDLRequest(VaadinRequest request) {
index ac2d81b202dc36aded0b718a29b243ab83ea4059..11e341a16f2957def727f202628912456d494a90 100644 (file)
@@ -428,8 +428,8 @@ public class VaadinPortlet extends GenericPortlet implements Constants {
                             .getCommunicationManager();
 
                     if (requestType == RequestType.PUBLISHED_FILE) {
-                        communicationManager.servePublishedFile(
-                                vaadinRequest, vaadinResponse);
+                        communicationManager.servePublishedFile(vaadinRequest,
+                                vaadinResponse);
                         return;
                     } else if (requestType == RequestType.HEARTBEAT) {
                         communicationManager.handleHeartbeatRequest(
index 0902924e4bb5d25b0d14193920e6109017efd40c..2ce3e25b2a565b8af338b05719a7b773d0403c23 100644 (file)
@@ -33,8 +33,8 @@ import com.vaadin.server.ComponentSizeValidator;
 import com.vaadin.server.ErrorMessage;
 import com.vaadin.server.Resource;
 import com.vaadin.server.VaadinSession;
-import com.vaadin.shared.ComponentConstants;
 import com.vaadin.shared.AbstractComponentState;
+import com.vaadin.shared.ComponentConstants;
 import com.vaadin.shared.ui.ComponentStateUtil;
 import com.vaadin.util.ReflectTools;
 
index 5538c3ac5e8f436736edff3cf89eabc68c9714a7..32f52eb3eb924b44f05808c3258c339a690091e3 100644 (file)
@@ -17,7 +17,6 @@ package com.vaadin.ui;
 
 import java.util.EventListener;
 
-import com.vaadin.server.ClientConnector;
 import com.vaadin.server.PaintException;
 import com.vaadin.server.PaintTarget;
 import com.vaadin.server.VariableOwner;
index f6101be9168e7da9a000ecca12cbc5cf3a7bb41f..a5e8f5e508c8d5658ab848e98f8cc5ebd7b99ac2 100644 (file)
@@ -37,8 +37,8 @@ import com.vaadin.server.PaintTarget;
 import com.vaadin.server.UIProvider;
 import com.vaadin.server.VaadinRequest;
 import com.vaadin.server.VaadinService;
-import com.vaadin.server.VaadinSession;
 import com.vaadin.server.VaadinServlet;
+import com.vaadin.server.VaadinSession;
 import com.vaadin.shared.EventId;
 import com.vaadin.shared.MouseEventDetails;
 import com.vaadin.shared.ui.ui.UIConstants;
index 5f9269c6e380f1d5e9d1445fadd9746fefd64002..c7330001d3057c8b48dc3d135e9fd5512a8312be 100644 (file)
@@ -13,7 +13,6 @@ import javax.servlet.http.HttpServletRequest;
 
 import junit.framework.TestCase;
 
-
 public class TestAbstractApplicationServletStaticFilesLocation extends TestCase {
 
     VaadinServlet servlet;
index e88786432ce90eca4a861667fe4a603869734d32..b5933bbd10eaf2b66abddc666f75f73c5b198ce4 100644 (file)
@@ -144,8 +144,7 @@ public class VaadinClasses {
             String basePackage, String[] ignoredPackages) throws IOException {
         List<Class<? extends T>> classes = new ArrayList<Class<? extends T>>();
         String basePackageDirName = "/" + basePackage.replace('.', '/');
-        URL location = VaadinSession.class
-                .getResource(basePackageDirName);
+        URL location = VaadinSession.class.getResource(basePackageDirName);
         if (location.getProtocol().equals("file")) {
             try {
                 File f = new File(location.toURI());
index 577275b4d9652dda2711725cf54bfaf5facaa8ea..cd9b6c66312a7fd8142b3c6689f99c614a13b14a 100644 (file)
@@ -18,8 +18,7 @@ public class RemoveListenersOnDetach {
     int numReadOnlyChanges = 0;
 
     AbstractField field = new AbstractField() {
-        final private VaadinSession application = new VaadinSession(
-                null);
+        final private VaadinSession application = new VaadinSession(null);
         private UI uI = new UI() {
 
             @Override
index c680e592108b92df448dabe87bf490171c0b5713..9ac3dfa4eaeb657d26a27809de6ec156a0c575bb 100644 (file)
@@ -57,7 +57,8 @@ public class UriFragmentManagerTest extends TestCase {
         navigator.navigateTo("test");
         control.replay();
 
-        UriFragmentChangedEvent event = new UriFragmentChangedEvent(page, "oldtest");
+        UriFragmentChangedEvent event = new UriFragmentChangedEvent(page,
+                "oldtest");
         manager.uriFragmentChanged(event);
     }
 }
index 61bb33521d197db8c26812df2c8b08b69ea2a493..a21a0d0b35b6ac0c3b7233e3e03816004b6b4fcf 100644 (file)
@@ -26,8 +26,8 @@ public class ApplicationConstants {
 
     public static final String HEARTBEAT_REQUEST_PATH = "HEARTBEAT/";
 
-    public static final String PUBLISHED_FILE_PATH = APP_REQUEST_PATH
-            + '/' + "PUBLISHED";
+    public static final String PUBLISHED_FILE_PATH = APP_REQUEST_PATH + '/'
+            + "PUBLISHED";
 
     public static final String APP_PROTOCOL_PREFIX = "app://";
     public static final String PUBLISHED_PROTOCOL_NAME = "published";
index 6b38e2e9f2d0466c54b1de6f3d697fe80f7bc168..d7c584605474838eb927f7a5a28b66a0af2686b8 100644 (file)
@@ -2,7 +2,6 @@ package com.vaadin.shared.ui.popupview;
 
 import com.vaadin.shared.communication.ServerRpc;
 
-
 public interface PopupViewServerRpc extends ServerRpc {
 
     public void setPopupVisibility(boolean visible);
index 9a818f0a2080cab7bb861cf7807574faed803fe9..7cf07c4b0dbb7401ea7a2a0dd45a8e1936da59e5 100644 (file)
@@ -15,6 +15,7 @@ public class IfElseDefNode extends Node {
         return b.toString();
     }
 
+    @Override
     public void traverse() {
         try {
 
index 0d00fd2d0c47c5599b7d3db91190fe755f0e74e6..a3fdd1cefa70ec3e7c70f1fc5f29bf257af0dda6 100644 (file)
@@ -49,7 +49,7 @@ public class BlockNodeHandler {
         ArrayList<String> newList = new ArrayList<String>();
         ArrayList<String> parentSelectors = ((BlockNode) node.getParentNode())
                 .getSelectorList();
-        ArrayList<String> childSelectors = ((BlockNode) node).getSelectorList();
+        ArrayList<String> childSelectors = node.getSelectorList();
         for (int i = 0; i < parentSelectors.size(); i++) {
             String parentSelector = parentSelectors.get(i);
             for (int j = 0; j < childSelectors.size(); j++) {
index c356465fcc893e3be11295009a32370c16ea4f37..8e8d94bcbd2a22c3ab64c5b362cf27a304cd93b3 100644 (file)
@@ -37,8 +37,8 @@ import com.vaadin.server.SessionInitListener;
 import com.vaadin.server.UIClassSelectionEvent;
 import com.vaadin.server.UIProvider;
 import com.vaadin.server.VaadinRequest;
-import com.vaadin.server.VaadinSession;
 import com.vaadin.server.VaadinServletRequest;
+import com.vaadin.server.VaadinSession;
 import com.vaadin.tests.components.TestBase;
 import com.vaadin.ui.UI;
 
index 1576a5888fb0d25e2d96571ef8339c6c5ec13613..8375b75f4b224e4e12a81e9f79c9296f02479a64 100644 (file)
@@ -16,9 +16,9 @@ import com.vaadin.ui.Label;
 import com.vaadin.ui.LegacyWindow;
 import com.vaadin.ui.Select;
 
-public class ListenerOrder extends com.vaadin.server.LegacyApplication implements
-        Button.ClickListener, PropertySetChangeListener, ItemSetChangeListener,
-        ValueChangeListener {
+public class ListenerOrder extends com.vaadin.server.LegacyApplication
+        implements Button.ClickListener, PropertySetChangeListener,
+        ItemSetChangeListener, ValueChangeListener {
 
     Button b1;
 
index 934a98e910b427bd9079aa1c67123d826409ad1b..0e1256680a78773caea48bea3c06d456820e1c2d 100644 (file)
@@ -107,8 +107,8 @@ public class Parameters extends com.vaadin.server.LegacyApplication implements
     }
 
     @Override
-    public boolean handleRequest(VaadinSession session,
-            VaadinRequest request, VaadinResponse response) throws IOException {
+    public boolean handleRequest(VaadinSession session, VaadinRequest request,
+            VaadinResponse response) throws IOException {
         context.setValue("Context not available");
         relative.setValue(request.getPathInfo());
 
index ea462dbaaef5c3dc142f95d3d076a4acf7e3e2ba..f5d90bae79d4af4ca3212e6e0854f472f4d8e471 100644 (file)
@@ -5,7 +5,6 @@ import com.vaadin.data.Property;
 import com.vaadin.data.Property.ValueChangeEvent;
 import com.vaadin.server.ClassResource;
 import com.vaadin.server.DownloadStream;
-import com.vaadin.server.ErrorEvent;
 import com.vaadin.server.LegacyApplication;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;
index 34c102df7f8c2b8ab45d511980b4304071ff1763..8988fe764a13375cd56f680f31f83f2b74a63ec3 100644 (file)
@@ -21,12 +21,13 @@ public class RefreshStatePreserve extends AbstractTestUI {
         addComponent(log);
 
         log.log("Initial fragment: " + getPage().getUriFragment());
-        getPage().addUriFragmentChangedListener(new UriFragmentChangedListener() {
-            @Override
-            public void uriFragmentChanged(UriFragmentChangedEvent event) {
-                log.log("Fragment changed to " + event.getUriFragment());
-            }
-        });
+        getPage().addUriFragmentChangedListener(
+                new UriFragmentChangedListener() {
+                    @Override
+                    public void uriFragmentChanged(UriFragmentChangedEvent event) {
+                        log.log("Fragment changed to " + event.getUriFragment());
+                    }
+                });
     }
 
     @Override
index 7ab552a96b62bfa3956db5be6edf51bea18f983d..9dee2fe0b68d6cfe999831db7403d61061b5a44d 100644 (file)
@@ -15,7 +15,6 @@
  */
 package com.vaadin.tests.application;
 
-import com.vaadin.server.ErrorEvent;
 import com.vaadin.tests.components.TestBase;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;
index 82d876d9cbe72ceedf315682c041bbb198ee50cd..b6774ae56a42dd5b7921a51a9ce670c1b4ded4f0 100644 (file)
@@ -93,8 +93,7 @@ public class ThreadLocalInstances extends AbstractTestCase {
         reportStatus(phase, VaadinSession.getCurrent(), UI.getCurrent());
     }
 
-    private void reportStatus(String phase, VaadinSession application,
-            UI uI) {
+    private void reportStatus(String phase, VaadinSession application, UI uI) {
         log.log(getState(application, this) + " app in " + phase);
         log.log(getState(uI, mainWindow) + " root in " + phase);
     }
index 0cde43119adbe942cea346beab62082253cda37c..f36437326a79e30445d38cbefeaf14fbfec71fe9 100644 (file)
@@ -14,7 +14,6 @@ import com.vaadin.event.FieldEvents.BlurNotifier;
 import com.vaadin.event.FieldEvents.FocusEvent;
 import com.vaadin.event.FieldEvents.FocusListener;
 import com.vaadin.event.FieldEvents.FocusNotifier;
-import com.vaadin.server.ErrorEvent;
 import com.vaadin.server.Resource;
 import com.vaadin.server.ThemeResource;
 import com.vaadin.tests.util.Log;
index db6ff9f5373cfa3d841460cf89a8969307cc5c01..4a9c46409e326aa17629f799de552685559e5fb7 100644 (file)
@@ -7,7 +7,6 @@ import com.vaadin.ui.VerticalLayout;
 
 public class HierarchyChangeForRemovedComponentContainers extends TestBase {
 
-
     private HorizontalLayout mainContent;
     private VerticalLayout lo2;
 
index b08d27eefad3a0cd820f4d362a9cc708d0a01f95..eba39499cddb9dc960a34d0206068b00ac23b0a4 100644 (file)
@@ -74,6 +74,7 @@ public class AbsoluteLayoutHideComponent extends AbstractTestUI {
         btnLogin.setWidth("-1px");
         btnLogin.setHeight("-1px");
         btnLogin.addClickListener(new Button.ClickListener() {
+            @Override
             public void buttonClick(Button.ClickEvent event) {
                 login();
             }
index 646b8f67f7fc35058bdb8c369346a2993b80bb9d..51ca47b4b72ff8024a750c78eb192b94c941799c 100644 (file)
@@ -2,7 +2,6 @@ package com.vaadin.tests.components.button;
 
 import com.vaadin.event.ShortcutAction.KeyCode;
 import com.vaadin.event.ShortcutAction.ModifierKey;
-import com.vaadin.server.ErrorEvent;
 import com.vaadin.tests.components.TestBase;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;
index 410b5c17ada4df5c7b5c3dbd1e3dd91d56c6e982..c2c3703ee42fa46f3fff957eb01411a41f6e19fa 100644 (file)
@@ -12,8 +12,7 @@ public class GridLayoutComboBoxZoomOut extends AbstractTestCase {
 
     @Override
     public void init() {
-        LegacyWindow mainWindow = new LegacyWindow(
-                "Gridlayoutbug Application");
+        LegacyWindow mainWindow = new LegacyWindow("Gridlayoutbug Application");
         setMainWindow(mainWindow);
 
         Label description = new Label(
index 731869f668401c98479be440700ba4976b228f27..1ba6409a6fb9e9bc32d0646f1583f0be97ba18fb 100644 (file)
@@ -9,6 +9,7 @@ public class PopupDateFieldTextEnabled extends TestBase {
 
     private static final String ENABLED = "DateField text box enabled";
     private static final String DISABLED = "DateField text box disabled";
+
     @Override
     public void setup() {
         final PopupDateField field = new PopupDateField();
@@ -19,9 +20,9 @@ public class PopupDateFieldTextEnabled extends TestBase {
             public void valueChange(Property.ValueChangeEvent event) {
                 field.setTextFieldEnabled((Boolean) event.getProperty()
                         .getValue());
-                if(field.isTextFieldEnabled()){
+                if (field.isTextFieldEnabled()) {
                     box.setCaption(ENABLED);
-                }else{
+                } else {
                     box.setCaption(DISABLED);
                 }
             }
index 7ddaabd60e646f4ec126cabbab4d78f011653679..0849980384d3813b2c0716723103a1a6faeaf0ea 100644 (file)
@@ -22,7 +22,6 @@ import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.Button.ClickListener;
 import com.vaadin.ui.ComboBox;
 import com.vaadin.ui.Component;
-import com.vaadin.ui.ComponentContainer;
 import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.VerticalLayout;
 
@@ -56,7 +55,7 @@ public class InsertComponentInHorizontalLayout extends AbstractTestUI {
 
     @Override
     protected void setup(VaadinRequest request) {
-        setContent((ComponentContainer) getTestLayout());
+        setContent(getTestLayout());
     }
 
     @Override
index e85bfc55a739ec8a5cf51c545c45e6169b0dd02c..1e3c058458034a4613c83099431f2d8ed8e6fda0 100644 (file)
@@ -49,8 +49,8 @@ public class PropertyValueChange extends TestBase {
                 Object columnId) {
             final Label l = new Label();
             @SuppressWarnings("unchecked")
-            final Property<Integer> integer = (Property<Integer>) source
-                    .getContainerProperty(itemId, "integer");
+            final Property<Integer> integer = source.getContainerProperty(
+                    itemId, "integer");
             l.setValue(String.valueOf(getMultipliedValue(integer)));
 
             // we must hook value change listener to ensure updates in all use
index af0cd8b49b977393eb9b8bca4e0ebef2242719bc..f1a53eca60e4b4c52ccd9e9c11e83cd65d73f192 100644 (file)
@@ -26,6 +26,7 @@ public class TabsheetShouldUpdateHeight extends TestBase {
         final Button btnSwitch = new Button("switch to Tab2",\r
                 new Button.ClickListener() {\r
 \r
+                    @Override\r
                     public void buttonClick(final ClickEvent inEvent) {\r
                         tabsOuter.setSelectedTab(tabsInner);\r
                         tabsInner.setSelectedTab(tab2);\r
index 8e0eac801d4b3e7f4920d5856d439c28f863d353..6580133645f83438fcf4af5dcd626a23dea159bc 100644 (file)
@@ -41,6 +41,7 @@ public class TreeIconUpdate extends TestBase {
 
         Button button = new Button("Change icon", new ClickListener() {
 
+            @Override
             public void buttonClick(ClickEvent event) {
                 tree.getItem("bar0").getItemProperty("icon").setValue(ICON2);
             }
@@ -49,6 +50,7 @@ public class TreeIconUpdate extends TestBase {
         addComponent(button);
         button = new Button("Change caption", new ClickListener() {
 
+            @Override
             public void buttonClick(ClickEvent event) {
                 tree.getItem("bar0").getItemProperty("name").setValue("foo");
             }
index c9788b854063475f387111da80e931fe76db301e..ce8ca8e083dd237008311430c4427ed82a3ffb9e 100644 (file)
@@ -15,19 +15,23 @@ public class InitialFragmentEvent extends AbstractTestUI {
 
     @Override
     protected void setup(VaadinRequest request) {
-        getPage().addUriFragmentChangedListener(new UriFragmentChangedListener() {
-
-            public void uriFragmentChanged(UriFragmentChangedEvent source) {
-                String newFragment = source.getUriFragment();
-                log.log("Fragment changed from " + lastKnownFragment + " to "
-                        + newFragment);
-                lastKnownFragment = newFragment;
-            }
-        });
+        getPage().addUriFragmentChangedListener(
+                new UriFragmentChangedListener() {
+
+                    @Override
+                    public void uriFragmentChanged(
+                            UriFragmentChangedEvent source) {
+                        String newFragment = source.getUriFragment();
+                        log.log("Fragment changed from " + lastKnownFragment
+                                + " to " + newFragment);
+                        lastKnownFragment = newFragment;
+                    }
+                });
         addComponent(log);
         addComponent(new Button("Set fragment to 'foo'",
                 new Button.ClickListener() {
 
+                    @Override
                     public void buttonClick(ClickEvent event) {
                         setFragment("foo");
                     }
@@ -35,6 +39,7 @@ public class InitialFragmentEvent extends AbstractTestUI {
         addComponent(new Button("Set fragment to 'bar'",
                 new Button.ClickListener() {
 
+                    @Override
                     public void buttonClick(ClickEvent event) {
                         setFragment("bar");
                     }
index 49b8472a7a2a39ab86a9c9a8c148b6c468bce9b0..25bf40edde301fae7ebbd3c2bfc0b6716ff02b1a 100644 (file)
@@ -18,8 +18,7 @@ public class UIsInMultipleTabs extends AbstractTestUIProvider {
     public static class TabUI extends UI {
         @Override
         protected void init(VaadinRequest request) {
-            VaadinSession application = VaadinSession
-                    .getCurrent();
+            VaadinSession application = VaadinSession.getCurrent();
             AtomicInteger count = numberOfUIsOpened.get(application);
             if (count == null) {
                 numberOfUIsOpened.putIfAbsent(application, new AtomicInteger());
index 8c38cf03b0f81818d26f09f267a38c43bbca06b5..9a9bc8fae0845fccfcaf8cd4fa66d4996de08c7a 100644 (file)
@@ -30,7 +30,7 @@ public class IntegerTextFieldDataSource extends AbstractTestUI {
         final MyBean myBean = new MyBean();
         BeanItem<MyBean> beanItem = new BeanItem<MyBean>(myBean);
 
-        final Property<Integer> integerProperty = (Property<Integer>) beanItem
+        final Property<Integer> integerProperty = beanItem
                 .getItemProperty("value");
         final TextField textField = new TextField("Text field", integerProperty);
 
index d7f397e488464b4aeb3acbb7e3fd38a0c6710a1e..3fc900bf3e712a153125493f8f73f26067437e9d 100644 (file)
@@ -7,7 +7,8 @@ import com.vaadin.ui.Label;
 import com.vaadin.ui.LegacyWindow;
 import com.vaadin.ui.TextField;
 
-public class Ticket1365 extends com.vaadin.server.LegacyApplication implements Handler {
+public class Ticket1365 extends com.vaadin.server.LegacyApplication implements
+        Handler {
 
     TextField f = new TextField();
 
index db6fa682fc916408864c6c979afec2d1af5c5478..05e336f4a1cf47673ec0a38e35143c6dac75c94c 100644 (file)
@@ -52,8 +52,8 @@ class MyDynamicResource implements RequestHandler {
      * stream that contains the response from the server.
      */
     @Override
-    public boolean handleRequest(VaadinSession session,
-            VaadinRequest request, VaadinResponse response) throws IOException {
+    public boolean handleRequest(VaadinSession session, VaadinRequest request,
+            VaadinResponse response) throws IOException {
         String relativeUri = request.getPathInfo();
         // Catch the given URI that identifies the resource, otherwise let other
         // URI handlers or the Application to handle the response.
index 79dcd3bd71c702a6cf0a072772cb6d38d5d9b518..ab43b45576a86e63e6592c85eb45d3607057346a 100644 (file)
@@ -94,8 +94,8 @@ public class Ticket1921 extends LegacyApplication implements RequestHandler {
     }
 
     @Override
-    public boolean handleRequest(VaadinSession session,
-            VaadinRequest request, VaadinResponse response) throws IOException {
+    public boolean handleRequest(VaadinSession session, VaadinRequest request,
+            VaadinResponse response) throws IOException {
         Map<String, String[]> parameters = request.getParameterMap();
         String[] s = parameters.get("state");
         if (s == null || s.length != 1) {
index e81ad3185aacbbfd3a20924e33e93bad939219e6..b50a1d073e51c977d91aa7ffc7b1539b7f264ff7 100644 (file)
@@ -48,8 +48,8 @@ public class Ticket2292 extends com.vaadin.server.LegacyApplication implements
     }
 
     @Override
-    public boolean handleRequest(VaadinSession session,
-            VaadinRequest request, VaadinResponse response) throws IOException {
+    public boolean handleRequest(VaadinSession session, VaadinRequest request,
+            VaadinResponse response) throws IOException {
         String relativeUri = request.getPathInfo();
 
         if (!relativeUri.contains("icon.png")) {
index 920ca76e37971ddf38636ca1c120e4910b3cbbf2..d095889d6d7e42230aec1d38720fa7736372350c 100644 (file)
@@ -97,7 +97,8 @@ public class Ticket34 extends LegacyApplication {
                 public void buttonClick(ClickEvent event) {
                     String viewName = tf.getValue().toString();
                     // fragmentChangedListener will change the view if possible
-                    event.getButton().getUI().getPage().setUriFragment(viewName);
+                    event.getButton().getUI().getPage()
+                            .setUriFragment(viewName);
                 }
             });
 
index 9d02cfa53cd7f5ed9616a2fd39e3bf3c24c70139..3c18899493caadb0c8dce629a59ac15de1c5dbba 100644 (file)
@@ -23,6 +23,7 @@ public class LargeContainer extends AbstractContainer implements
             this.itemId = itemId;
         }
 
+        @Override
         public Property<?> getItemProperty(Object propertyId) {
             ObjectProperty<String> property = new ObjectProperty<String>(
                     containerPropertyIdDefaults.get(propertyId) + " (item "
@@ -31,16 +32,19 @@ public class LargeContainer extends AbstractContainer implements
 
         }
 
+        @Override
         public Collection<?> getItemPropertyIds() {
             return getContainerPropertyIds();
         }
 
+        @Override
         @SuppressWarnings("rawtypes")
         public boolean addItemProperty(Object id, Property property)
                 throws UnsupportedOperationException {
             throw new UnsupportedOperationException("Cannot add item property");
         }
 
+        @Override
         public boolean removeItemProperty(Object id)
                 throws UnsupportedOperationException {
             throw new UnsupportedOperationException(
@@ -54,6 +58,7 @@ public class LargeContainer extends AbstractContainer implements
     private Map<Object, Class<?>> containerPropertyIdTypes = new HashMap<Object, Class<?>>();
     private Map<Object, Object> containerPropertyIdDefaults = new HashMap<Object, Object>();
 
+    @Override
     public Object nextItemId(Object itemId) {
         Integer id = (Integer) itemId;
         if (id >= size() - 1) {
@@ -62,6 +67,7 @@ public class LargeContainer extends AbstractContainer implements
         return (id + 1);
     }
 
+    @Override
     public Object prevItemId(Object itemId) {
         Integer id = (Integer) itemId;
         if (id <= 0) {
@@ -70,6 +76,7 @@ public class LargeContainer extends AbstractContainer implements
         return (id - 1);
     }
 
+    @Override
     public Object firstItemId() {
         if (0 == size()) {
             return null;
@@ -77,6 +84,7 @@ public class LargeContainer extends AbstractContainer implements
         return 0;
     }
 
+    @Override
     public Object lastItemId() {
         if (0 == size()) {
             return null;
@@ -84,6 +92,7 @@ public class LargeContainer extends AbstractContainer implements
         return (size() - 1);
     }
 
+    @Override
     public boolean isFirstId(Object itemId) {
         if (null == itemId) {
             return false;
@@ -91,6 +100,7 @@ public class LargeContainer extends AbstractContainer implements
         return itemId.equals(firstItemId());
     }
 
+    @Override
     public boolean isLastId(Object itemId) {
         if (null == itemId) {
             return false;
@@ -98,6 +108,7 @@ public class LargeContainer extends AbstractContainer implements
         return itemId.equals(lastItemId());
     }
 
+    @Override
     public TestItem getItem(Object itemId) {
         if (!containsId(itemId)) {
             return null;
@@ -105,6 +116,7 @@ public class LargeContainer extends AbstractContainer implements
         return new TestItem(itemId);
     }
 
+    @Override
     public Collection<?> getItemIds() {
         return new RangeCollection(size());
     }
@@ -116,6 +128,7 @@ public class LargeContainer extends AbstractContainer implements
                 numberOfIds, this);
     }
 
+    @Override
     public Property<?> getContainerProperty(Object itemId, Object propertyId) {
         TestItem item = getItem(itemId);
         if (null == item) {
@@ -124,10 +137,12 @@ public class LargeContainer extends AbstractContainer implements
         return item.getItemProperty(propertyId);
     }
 
+    @Override
     public int size() {
         return size;
     }
 
+    @Override
     public boolean containsId(Object itemId) {
         if (!(itemId instanceof Integer)) {
             return false;
@@ -136,6 +151,7 @@ public class LargeContainer extends AbstractContainer implements
         return (id >= 0 && id < (size() - 1));
     }
 
+    @Override
     public int indexOfId(Object itemId) {
         if (!containsId(itemId)) {
             return -1;
@@ -143,6 +159,7 @@ public class LargeContainer extends AbstractContainer implements
         return (Integer) itemId;
     }
 
+    @Override
     public Object getIdByIndex(int index) {
         return index;
     }
@@ -151,19 +168,23 @@ public class LargeContainer extends AbstractContainer implements
         size = newSize;
     }
 
+    @Override
     public boolean removeAllItems() throws UnsupportedOperationException {
         setSize(0);
         return true;
     }
 
+    @Override
     public Class<?> getType(Object propertyId) {
         return containerPropertyIdTypes.get(propertyId);
     }
 
+    @Override
     public Collection<?> getContainerPropertyIds() {
         return containerPropertyIdTypes.keySet();
     }
 
+    @Override
     public boolean addContainerProperty(Object propertyId, Class<?> type,
             Object defaultValue) throws UnsupportedOperationException {
         if (containerPropertyIdTypes.containsKey(propertyId) || null == type) {
@@ -174,6 +195,7 @@ public class LargeContainer extends AbstractContainer implements
         return true;
     }
 
+    @Override
     public boolean removeContainerProperty(Object propertyId)
             throws UnsupportedOperationException {
         if (!containerPropertyIdTypes.containsKey(propertyId)) {
@@ -184,33 +206,40 @@ public class LargeContainer extends AbstractContainer implements
         return true;
     }
 
+    @Override
     public Item addItem(Object itemId) throws UnsupportedOperationException {
         throw new UnsupportedOperationException("Not supported");
     }
 
+    @Override
     public Object addItem() throws UnsupportedOperationException {
         throw new UnsupportedOperationException("Not supported");
     }
 
+    @Override
     public boolean removeItem(Object itemId)
             throws UnsupportedOperationException {
         throw new UnsupportedOperationException("Not supported");
     }
 
+    @Override
     public Object addItemAt(int index) throws UnsupportedOperationException {
         throw new UnsupportedOperationException("Not supported");
     }
 
+    @Override
     public Item addItemAt(int index, Object newItemId)
             throws UnsupportedOperationException {
         throw new UnsupportedOperationException("Not supported");
     }
 
+    @Override
     public Object addItemAfter(Object previousItemId)
             throws UnsupportedOperationException {
         throw new UnsupportedOperationException("Not supported");
     }
 
+    @Override
     public Item addItemAfter(Object previousItemId, Object newItemId)
             throws UnsupportedOperationException {
         throw new UnsupportedOperationException("Not supported");
index f26e3cfb15740ea5377ccd3f70a0f108ee0aed24..302619c5b9a66a9a9bb5af18ea746b91a3c493fe 100644 (file)
@@ -15,14 +15,17 @@ public class RangeCollection extends AbstractCollection<Integer> {
             value = 0;
         }
 
+        @Override
         public boolean hasNext() {
             return (value < max - 1);
         }
 
+        @Override
         public Integer next() {
             return value++;
         }
 
+        @Override
         public void remove() {
             throw new UnsupportedOperationException();
         }
index 0eeae4ca9e7b94fc78133bc7648764c1f4d3b4c0..c141c456e933ccfe2c64b95b005f0c1b6ebaeb26 100644 (file)
@@ -43,8 +43,7 @@ public class SampleDirectory {
      * @param application
      * @return file pointing to sample directory
      */
-    public static File getDirectory(VaadinSession application,
-            LegacyWindow uI) {
+    public static File getDirectory(VaadinSession application, LegacyWindow uI) {
         String errorMessage = "Access to application "
                 + "context base directory failed, "
                 + "possible security constraint with Application "