From: Leif Åstrand Date: Wed, 21 Nov 2012 11:45:18 +0000 (+0200) Subject: Global code cleanup X-Git-Tag: 7.0.0.beta10~72 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fchanges%2F16%2F316%2F1;p=vaadin-framework.git Global code cleanup Change-Id: I14f46e6aa4f9cbdd9037f1c4ad1ac38fe7cbda86 --- diff --git a/client/src/com/vaadin/client/ApplicationConnection.java b/client/src/com/vaadin/client/ApplicationConnection.java index 4e24349570..8bfd7ee747 100644 --- a/client/src/com/vaadin/client/ApplicationConnection.java +++ b/client/src/com/vaadin/client/ApplicationConnection.java @@ -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) { diff --git a/client/src/com/vaadin/client/Util.java b/client/src/com/vaadin/client/Util.java index 7548cfe42a..a5ee78befb 100644 --- a/client/src/com/vaadin/client/Util.java +++ b/client/src/com/vaadin/client/Util.java @@ -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; diff --git a/client/src/com/vaadin/client/VCaption.java b/client/src/com/vaadin/client/VCaption.java index a662ef4a7b..390fe9d00f 100644 --- a/client/src/com/vaadin/client/VCaption.java +++ b/client/src/com/vaadin/client/VCaption.java @@ -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 { diff --git a/client/src/com/vaadin/client/ui/AbstractComponentConnector.java b/client/src/com/vaadin/client/ui/AbstractComponentConnector.java index 9868bc329d..cda6e8f369 100644 --- a/client/src/com/vaadin/client/ui/AbstractComponentConnector.java +++ b/client/src/com/vaadin/client/ui/AbstractComponentConnector.java @@ -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; diff --git a/client/src/com/vaadin/client/ui/VFilterSelect.java b/client/src/com/vaadin/client/ui/VFilterSelect.java index bca68a86f3..d7e354a6fa 100644 --- a/client/src/com/vaadin/client/ui/VFilterSelect.java +++ b/client/src/com/vaadin/client/ui/VFilterSelect.java @@ -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() diff --git a/client/src/com/vaadin/client/ui/VFormLayout.java b/client/src/com/vaadin/client/ui/VFormLayout.java index 49c991b39c..62499bd973 100644 --- a/client/src/com/vaadin/client/ui/VFormLayout.java +++ b/client/src/com/vaadin/client/ui/VFormLayout.java @@ -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 styles = new ArrayList(); if (ComponentStateUtil.hasStyles(state)) { for (String name : state.styles) { diff --git a/client/src/com/vaadin/client/ui/VPopupView.java b/client/src/com/vaadin/client/ui/VPopupView.java index 129e233d5e..a8cdc59f9c 100644 --- a/client/src/com/vaadin/client/ui/VPopupView.java +++ b/client/src/com/vaadin/client/ui/VPopupView.java @@ -391,6 +391,7 @@ public class VPopupView extends HTML implements Iterable { VisibilityChangeEvent.getType()); } + @Override public Iterator iterator() { return Collections.singleton((Widget) popup).iterator(); } diff --git a/client/src/com/vaadin/client/ui/VScrollTable.java b/client/src/com/vaadin/client/ui/VScrollTable.java index 9b06b711cb..55ad533132 100644 --- a/client/src/com/vaadin/client/ui/VScrollTable.java +++ b/client/src/com/vaadin/client/ui/VScrollTable.java @@ -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); diff --git a/client/src/com/vaadin/client/ui/button/ButtonConnector.java b/client/src/com/vaadin/client/ui/button/ButtonConnector.java index f84659ece1..18913b9b0d 100644 --- a/client/src/com/vaadin/client/ui/button/ButtonConnector.java +++ b/client/src/com/vaadin/client/ui/button/ButtonConnector.java @@ -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(); diff --git a/client/src/com/vaadin/client/ui/popupview/VisibilityChangeEvent.java b/client/src/com/vaadin/client/ui/popupview/VisibilityChangeEvent.java index e2cec40a8f..929f712459 100644 --- a/client/src/com/vaadin/client/ui/popupview/VisibilityChangeEvent.java +++ b/client/src/com/vaadin/client/ui/popupview/VisibilityChangeEvent.java @@ -2,8 +2,7 @@ package com.vaadin.client.ui.popupview; import com.google.gwt.event.shared.GwtEvent; -public class VisibilityChangeEvent extends - GwtEvent { +public class VisibilityChangeEvent extends GwtEvent { private static Type TYPE; diff --git a/client/src/com/vaadin/client/ui/richtextarea/RichTextAreaConnector.java b/client/src/com/vaadin/client/ui/richtextarea/RichTextAreaConnector.java index 79479fd3ed..afcf479499 100644 --- a/client/src/com/vaadin/client/ui/richtextarea/RichTextAreaConnector.java +++ b/client/src/com/vaadin/client/ui/richtextarea/RichTextAreaConnector.java @@ -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; diff --git a/client/src/com/vaadin/client/ui/textfield/TextFieldConnector.java b/client/src/com/vaadin/client/ui/textfield/TextFieldConnector.java index 25d6ab8369..c653b06cf9 100644 --- a/client/src/com/vaadin/client/ui/textfield/TextFieldConnector.java +++ b/client/src/com/vaadin/client/ui/textfield/TextFieldConnector.java @@ -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; diff --git a/client/src/com/vaadin/client/ui/treetable/TreeTableConnector.java b/client/src/com/vaadin/client/ui/treetable/TreeTableConnector.java index 11200f28b7..be6e54c5ce 100644 --- a/client/src/com/vaadin/client/ui/treetable/TreeTableConnector.java +++ b/client/src/com/vaadin/client/ui/treetable/TreeTableConnector.java @@ -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; diff --git a/server/src/com/vaadin/event/ShortcutAction.java b/server/src/com/vaadin/event/ShortcutAction.java index 9d13d41b9f..29238dfca9 100644 --- a/server/src/com/vaadin/event/ShortcutAction.java +++ b/server/src/com/vaadin/event/ShortcutAction.java @@ -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; diff --git a/server/src/com/vaadin/server/AbstractCommunicationManager.java b/server/src/com/vaadin/server/AbstractCommunicationManager.java index 31920b5df6..50150c5d5c 100644 --- a/server/src/com/vaadin/server/AbstractCommunicationManager.java +++ b/server/src/com/vaadin/server/AbstractCommunicationManager.java @@ -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); diff --git a/server/src/com/vaadin/server/DefaultSystemMessagesProvider.java b/server/src/com/vaadin/server/DefaultSystemMessagesProvider.java index 7111a8bbbb..2d1ff81311 100644 --- a/server/src/com/vaadin/server/DefaultSystemMessagesProvider.java +++ b/server/src/com/vaadin/server/DefaultSystemMessagesProvider.java @@ -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()}. diff --git a/server/src/com/vaadin/server/ServletPortletHelper.java b/server/src/com/vaadin/server/ServletPortletHelper.java index 00fdccdeb7..be5fd1c287 100644 --- a/server/src/com/vaadin/server/ServletPortletHelper.java +++ b/server/src/com/vaadin/server/ServletPortletHelper.java @@ -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) { diff --git a/server/src/com/vaadin/server/VaadinPortlet.java b/server/src/com/vaadin/server/VaadinPortlet.java index ac2d81b202..11e341a16f 100644 --- a/server/src/com/vaadin/server/VaadinPortlet.java +++ b/server/src/com/vaadin/server/VaadinPortlet.java @@ -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( diff --git a/server/src/com/vaadin/ui/AbstractComponent.java b/server/src/com/vaadin/ui/AbstractComponent.java index 0902924e4b..2ce3e25b2a 100644 --- a/server/src/com/vaadin/ui/AbstractComponent.java +++ b/server/src/com/vaadin/ui/AbstractComponent.java @@ -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; diff --git a/server/src/com/vaadin/ui/LegacyComponent.java b/server/src/com/vaadin/ui/LegacyComponent.java index 5538c3ac5e..32f52eb3eb 100644 --- a/server/src/com/vaadin/ui/LegacyComponent.java +++ b/server/src/com/vaadin/ui/LegacyComponent.java @@ -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; diff --git a/server/src/com/vaadin/ui/UI.java b/server/src/com/vaadin/ui/UI.java index f6101be916..a5e8f5e508 100644 --- a/server/src/com/vaadin/ui/UI.java +++ b/server/src/com/vaadin/ui/UI.java @@ -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; diff --git a/server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java b/server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java index 5f9269c6e3..c7330001d3 100644 --- a/server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java +++ b/server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java @@ -13,7 +13,6 @@ import javax.servlet.http.HttpServletRequest; import junit.framework.TestCase; - public class TestAbstractApplicationServletStaticFilesLocation extends TestCase { VaadinServlet servlet; diff --git a/server/tests/src/com/vaadin/tests/VaadinClasses.java b/server/tests/src/com/vaadin/tests/VaadinClasses.java index e88786432c..b5933bbd10 100644 --- a/server/tests/src/com/vaadin/tests/VaadinClasses.java +++ b/server/tests/src/com/vaadin/tests/VaadinClasses.java @@ -144,8 +144,7 @@ public class VaadinClasses { String basePackage, String[] ignoredPackages) throws IOException { List> classes = new ArrayList>(); 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()); diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java index 577275b4d9..cd9b6c6631 100644 --- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java +++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java @@ -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 diff --git a/server/tests/src/com/vaadin/tests/server/navigator/UriFragmentManagerTest.java b/server/tests/src/com/vaadin/tests/server/navigator/UriFragmentManagerTest.java index c680e59210..9ac3dfa4ea 100644 --- a/server/tests/src/com/vaadin/tests/server/navigator/UriFragmentManagerTest.java +++ b/server/tests/src/com/vaadin/tests/server/navigator/UriFragmentManagerTest.java @@ -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); } } diff --git a/shared/src/com/vaadin/shared/ApplicationConstants.java b/shared/src/com/vaadin/shared/ApplicationConstants.java index 61bb33521d..a21a0d0b35 100644 --- a/shared/src/com/vaadin/shared/ApplicationConstants.java +++ b/shared/src/com/vaadin/shared/ApplicationConstants.java @@ -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"; diff --git a/shared/src/com/vaadin/shared/ui/popupview/PopupViewServerRpc.java b/shared/src/com/vaadin/shared/ui/popupview/PopupViewServerRpc.java index 6b38e2e9f2..d7c5846054 100644 --- a/shared/src/com/vaadin/shared/ui/popupview/PopupViewServerRpc.java +++ b/shared/src/com/vaadin/shared/ui/popupview/PopupViewServerRpc.java @@ -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); diff --git a/theme-compiler/src/com/vaadin/sass/tree/controldirective/IfElseDefNode.java b/theme-compiler/src/com/vaadin/sass/tree/controldirective/IfElseDefNode.java index 9a818f0a20..7cf07c4b0d 100644 --- a/theme-compiler/src/com/vaadin/sass/tree/controldirective/IfElseDefNode.java +++ b/theme-compiler/src/com/vaadin/sass/tree/controldirective/IfElseDefNode.java @@ -15,6 +15,7 @@ public class IfElseDefNode extends Node { return b.toString(); } + @Override public void traverse() { try { diff --git a/theme-compiler/src/com/vaadin/sass/visitor/BlockNodeHandler.java b/theme-compiler/src/com/vaadin/sass/visitor/BlockNodeHandler.java index 0d00fd2d0c..a3fdd1cefa 100644 --- a/theme-compiler/src/com/vaadin/sass/visitor/BlockNodeHandler.java +++ b/theme-compiler/src/com/vaadin/sass/visitor/BlockNodeHandler.java @@ -49,7 +49,7 @@ public class BlockNodeHandler { ArrayList newList = new ArrayList(); ArrayList parentSelectors = ((BlockNode) node.getParentNode()) .getSelectorList(); - ArrayList childSelectors = ((BlockNode) node).getSelectorList(); + ArrayList childSelectors = node.getSelectorList(); for (int i = 0; i < parentSelectors.size(); i++) { String parentSelector = parentSelectors.get(i); for (int j = 0; j < childSelectors.size(); j++) { diff --git a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java index c356465fcc..8e8d94bcbd 100644 --- a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java +++ b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java @@ -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; diff --git a/uitest/src/com/vaadin/tests/ListenerOrder.java b/uitest/src/com/vaadin/tests/ListenerOrder.java index 1576a5888f..8375b75f4b 100644 --- a/uitest/src/com/vaadin/tests/ListenerOrder.java +++ b/uitest/src/com/vaadin/tests/ListenerOrder.java @@ -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; diff --git a/uitest/src/com/vaadin/tests/Parameters.java b/uitest/src/com/vaadin/tests/Parameters.java index 934a98e910..0e1256680a 100644 --- a/uitest/src/com/vaadin/tests/Parameters.java +++ b/uitest/src/com/vaadin/tests/Parameters.java @@ -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()); diff --git a/uitest/src/com/vaadin/tests/appengine/GAESyncTest.java b/uitest/src/com/vaadin/tests/appengine/GAESyncTest.java index ea462dbaae..f5d90bae79 100644 --- a/uitest/src/com/vaadin/tests/appengine/GAESyncTest.java +++ b/uitest/src/com/vaadin/tests/appengine/GAESyncTest.java @@ -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; diff --git a/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java b/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java index 34c102df7f..8988fe764a 100644 --- a/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java +++ b/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java @@ -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 diff --git a/uitest/src/com/vaadin/tests/application/TerminalErrorNotification.java b/uitest/src/com/vaadin/tests/application/TerminalErrorNotification.java index 7ab552a96b..9dee2fe0b6 100644 --- a/uitest/src/com/vaadin/tests/application/TerminalErrorNotification.java +++ b/uitest/src/com/vaadin/tests/application/TerminalErrorNotification.java @@ -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; diff --git a/uitest/src/com/vaadin/tests/application/ThreadLocalInstances.java b/uitest/src/com/vaadin/tests/application/ThreadLocalInstances.java index 82d876d9cb..b6774ae56a 100644 --- a/uitest/src/com/vaadin/tests/application/ThreadLocalInstances.java +++ b/uitest/src/com/vaadin/tests/application/ThreadLocalInstances.java @@ -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); } diff --git a/uitest/src/com/vaadin/tests/components/AbstractComponentTest.java b/uitest/src/com/vaadin/tests/components/AbstractComponentTest.java index 0cde43119a..f36437326a 100644 --- a/uitest/src/com/vaadin/tests/components/AbstractComponentTest.java +++ b/uitest/src/com/vaadin/tests/components/AbstractComponentTest.java @@ -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; diff --git a/uitest/src/com/vaadin/tests/components/HierarchyChangeForRemovedComponentContainers.java b/uitest/src/com/vaadin/tests/components/HierarchyChangeForRemovedComponentContainers.java index db6ff9f537..4a9c46409e 100644 --- a/uitest/src/com/vaadin/tests/components/HierarchyChangeForRemovedComponentContainers.java +++ b/uitest/src/com/vaadin/tests/components/HierarchyChangeForRemovedComponentContainers.java @@ -7,7 +7,6 @@ import com.vaadin.ui.VerticalLayout; public class HierarchyChangeForRemovedComponentContainers extends TestBase { - private HorizontalLayout mainContent; private VerticalLayout lo2; diff --git a/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java b/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java index b08d27eefa..eba39499cd 100644 --- a/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java +++ b/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java @@ -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(); } diff --git a/uitest/src/com/vaadin/tests/components/button/ShortCutListenerModification.java b/uitest/src/com/vaadin/tests/components/button/ShortCutListenerModification.java index 646b8f67f7..51ca47b4b7 100644 --- a/uitest/src/com/vaadin/tests/components/button/ShortCutListenerModification.java +++ b/uitest/src/com/vaadin/tests/components/button/ShortCutListenerModification.java @@ -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; diff --git a/uitest/src/com/vaadin/tests/components/combobox/GridLayoutComboBoxZoomOut.java b/uitest/src/com/vaadin/tests/components/combobox/GridLayoutComboBoxZoomOut.java index 410b5c17ad..c2c3703ee4 100644 --- a/uitest/src/com/vaadin/tests/components/combobox/GridLayoutComboBoxZoomOut.java +++ b/uitest/src/com/vaadin/tests/components/combobox/GridLayoutComboBoxZoomOut.java @@ -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( diff --git a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldTextEnabled.java b/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldTextEnabled.java index 731869f668..1ba6409a6f 100644 --- a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldTextEnabled.java +++ b/uitest/src/com/vaadin/tests/components/datefield/PopupDateFieldTextEnabled.java @@ -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); } } diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/InsertComponentInHorizontalLayout.java b/uitest/src/com/vaadin/tests/components/orderedlayout/InsertComponentInHorizontalLayout.java index 7ddaabd60e..0849980384 100644 --- a/uitest/src/com/vaadin/tests/components/orderedlayout/InsertComponentInHorizontalLayout.java +++ b/uitest/src/com/vaadin/tests/components/orderedlayout/InsertComponentInHorizontalLayout.java @@ -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 diff --git a/uitest/src/com/vaadin/tests/components/table/PropertyValueChange.java b/uitest/src/com/vaadin/tests/components/table/PropertyValueChange.java index e85bfc55a7..1e3c058458 100644 --- a/uitest/src/com/vaadin/tests/components/table/PropertyValueChange.java +++ b/uitest/src/com/vaadin/tests/components/table/PropertyValueChange.java @@ -49,8 +49,8 @@ public class PropertyValueChange extends TestBase { Object columnId) { final Label l = new Label(); @SuppressWarnings("unchecked") - final Property integer = (Property) source - .getContainerProperty(itemId, "integer"); + final Property integer = source.getContainerProperty( + itemId, "integer"); l.setValue(String.valueOf(getMultipliedValue(integer))); // we must hook value change listener to ensure updates in all use diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetShouldUpdateHeight.java b/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetShouldUpdateHeight.java index af0cd8b49b..f1a53eca60 100644 --- a/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetShouldUpdateHeight.java +++ b/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetShouldUpdateHeight.java @@ -26,6 +26,7 @@ public class TabsheetShouldUpdateHeight extends TestBase { final Button btnSwitch = new Button("switch to Tab2", new Button.ClickListener() { + @Override public void buttonClick(final ClickEvent inEvent) { tabsOuter.setSelectedTab(tabsInner); tabsInner.setSelectedTab(tab2); diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeIconUpdate.java b/uitest/src/com/vaadin/tests/components/tree/TreeIconUpdate.java index 8e0eac801d..6580133645 100644 --- a/uitest/src/com/vaadin/tests/components/tree/TreeIconUpdate.java +++ b/uitest/src/com/vaadin/tests/components/tree/TreeIconUpdate.java @@ -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"); } diff --git a/uitest/src/com/vaadin/tests/components/ui/InitialFragmentEvent.java b/uitest/src/com/vaadin/tests/components/ui/InitialFragmentEvent.java index c9788b8540..ce8ca8e083 100644 --- a/uitest/src/com/vaadin/tests/components/ui/InitialFragmentEvent.java +++ b/uitest/src/com/vaadin/tests/components/ui/InitialFragmentEvent.java @@ -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"); } diff --git a/uitest/src/com/vaadin/tests/components/ui/UIsInMultipleTabs.java b/uitest/src/com/vaadin/tests/components/ui/UIsInMultipleTabs.java index 49b8472a7a..25bf40edde 100644 --- a/uitest/src/com/vaadin/tests/components/ui/UIsInMultipleTabs.java +++ b/uitest/src/com/vaadin/tests/components/ui/UIsInMultipleTabs.java @@ -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()); diff --git a/uitest/src/com/vaadin/tests/minitutorials/v7a1/IntegerTextFieldDataSource.java b/uitest/src/com/vaadin/tests/minitutorials/v7a1/IntegerTextFieldDataSource.java index 8c38cf03b0..9a9bc8fae0 100644 --- a/uitest/src/com/vaadin/tests/minitutorials/v7a1/IntegerTextFieldDataSource.java +++ b/uitest/src/com/vaadin/tests/minitutorials/v7a1/IntegerTextFieldDataSource.java @@ -30,7 +30,7 @@ public class IntegerTextFieldDataSource extends AbstractTestUI { final MyBean myBean = new MyBean(); BeanItem beanItem = new BeanItem(myBean); - final Property integerProperty = (Property) beanItem + final Property integerProperty = beanItem .getItemProperty("value"); final TextField textField = new TextField("Text field", integerProperty); diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket1365.java b/uitest/src/com/vaadin/tests/tickets/Ticket1365.java index d7f397e488..3fc900bf3e 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket1365.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket1365.java @@ -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(); diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket1589.java b/uitest/src/com/vaadin/tests/tickets/Ticket1589.java index db6fa682fc..05e336f4a1 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket1589.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket1589.java @@ -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. diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket1921.java b/uitest/src/com/vaadin/tests/tickets/Ticket1921.java index 79dcd3bd71..ab43b45576 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket1921.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket1921.java @@ -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 parameters = request.getParameterMap(); String[] s = parameters.get("state"); if (s == null || s.length != 1) { diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket2292.java b/uitest/src/com/vaadin/tests/tickets/Ticket2292.java index e81ad3185a..b50a1d073e 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket2292.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket2292.java @@ -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")) { diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket34.java b/uitest/src/com/vaadin/tests/tickets/Ticket34.java index 920ca76e37..d095889d6d 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket34.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket34.java @@ -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); } }); diff --git a/uitest/src/com/vaadin/tests/util/LargeContainer.java b/uitest/src/com/vaadin/tests/util/LargeContainer.java index 9d02cfa53c..3c18899493 100644 --- a/uitest/src/com/vaadin/tests/util/LargeContainer.java +++ b/uitest/src/com/vaadin/tests/util/LargeContainer.java @@ -23,6 +23,7 @@ public class LargeContainer extends AbstractContainer implements this.itemId = itemId; } + @Override public Property getItemProperty(Object propertyId) { ObjectProperty property = new ObjectProperty( 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> containerPropertyIdTypes = new HashMap>(); private Map containerPropertyIdDefaults = new HashMap(); + @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"); diff --git a/uitest/src/com/vaadin/tests/util/RangeCollection.java b/uitest/src/com/vaadin/tests/util/RangeCollection.java index f26e3cfb15..302619c5b9 100644 --- a/uitest/src/com/vaadin/tests/util/RangeCollection.java +++ b/uitest/src/com/vaadin/tests/util/RangeCollection.java @@ -15,14 +15,17 @@ public class RangeCollection extends AbstractCollection { value = 0; } + @Override public boolean hasNext() { return (value < max - 1); } + @Override public Integer next() { return value++; } + @Override public void remove() { throw new UnsupportedOperationException(); } diff --git a/uitest/src/com/vaadin/tests/util/SampleDirectory.java b/uitest/src/com/vaadin/tests/util/SampleDirectory.java index 0eeae4ca9e..c141c456e9 100644 --- a/uitest/src/com/vaadin/tests/util/SampleDirectory.java +++ b/uitest/src/com/vaadin/tests/util/SampleDirectory.java @@ -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 "