diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-09-27 15:59:39 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-09-27 15:59:39 +0300 |
commit | cf1f89072dcd820248474a36cfc2f60e5f3f9a1b (patch) | |
tree | cbe0cde8462785ab04b46f62bb4a3d447f2c5c79 | |
parent | ed2d516f04fd156814cc43c55d36f567e2611ba2 (diff) | |
download | vaadin-framework-cf1f89072dcd820248474a36cfc2f60e5f3f9a1b.tar.gz vaadin-framework-cf1f89072dcd820248474a36cfc2f60e5f3f9a1b.zip |
Global code cleanup
60 files changed, 179 insertions, 210 deletions
diff --git a/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java b/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java index d65a2aeb9b..15407a16f4 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java @@ -410,15 +410,15 @@ public abstract class AbstractOrderedLayoutConnector extends boolean allChildrenHasVerticalAlignmentCenterOrBottom = hasVerticalAlignment .size() == getChildren().size(); boolean hasChildrenWithRelativeHeight = !hasRelativeHeight.isEmpty(); - - if(isVertical){ + + if (isVertical) { return false; } - - else if(!isUndefinedHeight()){ + + else if (!isUndefinedHeight()) { return false; } - + else if (!hasChildrenWithRelativeHeight) { return false; } @@ -513,7 +513,7 @@ public abstract class AbstractOrderedLayoutConnector extends private void updateLayoutHeight() { if (needsFixedHeight()) { int h = getMaxHeight(); - assert(h >= 0); + assert (h >= 0); h += getLayoutManager().getBorderHeight(getWidget().getElement()) + getLayoutManager().getPaddingHeight( getWidget().getElement()); diff --git a/server/src/com/vaadin/server/AbstractCommunicationManager.java b/server/src/com/vaadin/server/AbstractCommunicationManager.java index 3d334e11a5..b4f7ad4207 100644 --- a/server/src/com/vaadin/server/AbstractCommunicationManager.java +++ b/server/src/com/vaadin/server/AbstractCommunicationManager.java @@ -593,8 +593,7 @@ public abstract class AbstractCommunicationManager implements Serializable { if (!handleVariables(request, response, callback, session, uI)) { // var inconsistency; the client is probably out-of-sync - SystemMessages ci = response.getService() - .getSystemMessages(); + SystemMessages ci = response.getService().getSystemMessages(); String msg = ci.getOutOfSyncMessage(); String cap = ci.getOutOfSyncCaption(); if (msg != null || cap != null) { @@ -2614,8 +2613,7 @@ public abstract class AbstractCommunicationManager implements Serializable { .substring(ApplicationConstants.CONNECTOR_RESOURCE_PREFIX .length() + 2); - final String mimetype = response.getService().getMimeType( - resourceName); + final String mimetype = response.getService().getMimeType(resourceName); // Security check: avoid accidentally serving from the UI of the // classpath instead of relative to the context class diff --git a/server/src/com/vaadin/server/AddonContext.java b/server/src/com/vaadin/server/AddonContext.java index 0e147e4fcd..4773b4cebe 100644 --- a/server/src/com/vaadin/server/AddonContext.java +++ b/server/src/com/vaadin/server/AddonContext.java @@ -54,17 +54,15 @@ public class AddonContext implements Serializable { */ public AddonContext(VaadinService vaadinService) { this.vaadinService = vaadinService; - vaadinService - .addSessionInitListener(new SessionInitListener() { - @Override - public void sessionInit( - SessionInitEvent event) - throws ServiceException { - for (BootstrapListener l : bootstrapListeners) { - event.getSession().addBootstrapListener(l); - } - } - }); + vaadinService.addSessionInitListener(new SessionInitListener() { + @Override + public void sessionInit(SessionInitEvent event) + throws ServiceException { + for (BootstrapListener l : bootstrapListeners) { + event.getSession().addBootstrapListener(l); + } + } + }); vaadinService.setAddonContext(this); } diff --git a/server/src/com/vaadin/server/ConnectorResourceHandler.java b/server/src/com/vaadin/server/ConnectorResourceHandler.java index 1edd497d7c..cf002f8fe0 100644 --- a/server/src/com/vaadin/server/ConnectorResourceHandler.java +++ b/server/src/com/vaadin/server/ConnectorResourceHandler.java @@ -24,9 +24,8 @@ public class ConnectorResourceHandler 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 { String requestPath = request.getRequestPathInfo(); if (requestPath == null) { return false; diff --git a/server/src/com/vaadin/server/DefaultUIProvider.java b/server/src/com/vaadin/server/DefaultUIProvider.java index 4c44bec058..7efb6dea64 100644 --- a/server/src/com/vaadin/server/DefaultUIProvider.java +++ b/server/src/com/vaadin/server/DefaultUIProvider.java @@ -31,8 +31,7 @@ public class DefaultUIProvider extends UIProvider { if (uiClassNameObj instanceof String) { String uiClassName = uiClassNameObj.toString(); - ClassLoader classLoader = request.getService() - .getClassLoader(); + ClassLoader classLoader = request.getService().getClassLoader(); if (classLoader == null) { classLoader = getClass().getClassLoader(); } diff --git a/server/src/com/vaadin/server/GAEVaadinServlet.java b/server/src/com/vaadin/server/GAEVaadinServlet.java index 2849dc73a0..6ef107eabe 100644 --- a/server/src/com/vaadin/server/GAEVaadinServlet.java +++ b/server/src/com/vaadin/server/GAEVaadinServlet.java @@ -133,8 +133,8 @@ public class GAEVaadinServlet extends VaadinServlet { private static final String PROPERTY_APPENGINE_EXPIRES = "_expires"; protected void sendDeadlineExceededNotification( - VaadinServletRequest request, - VaadinServletResponse response) throws IOException { + VaadinServletRequest request, VaadinServletResponse response) + throws IOException { criticalNotification( request, response, @@ -144,8 +144,8 @@ public class GAEVaadinServlet extends VaadinServlet { } protected void sendNotSerializableNotification( - VaadinServletRequest request, - VaadinServletResponse response) throws IOException { + VaadinServletRequest request, VaadinServletResponse response) + throws IOException { criticalNotification( request, response, @@ -155,8 +155,7 @@ public class GAEVaadinServlet extends VaadinServlet { + "?restartApplication"); } - protected void sendCriticalErrorNotification( - VaadinServletRequest request, + protected void sendCriticalErrorNotification(VaadinServletRequest request, VaadinServletResponse response) throws IOException { criticalNotification( request, @@ -341,8 +340,7 @@ public class GAEVaadinServlet extends VaadinServlet { // will create new context if the above did not try { - return getService().findVaadinSession( - createVaadinRequest(request)); + return getService().findVaadinSession(createVaadinRequest(request)); } catch (Exception e) { throw new ServletException(e); } diff --git a/server/src/com/vaadin/server/GlobalResourceHandler.java b/server/src/com/vaadin/server/GlobalResourceHandler.java index a7fff8ae64..5b2082cd5a 100644 --- a/server/src/com/vaadin/server/GlobalResourceHandler.java +++ b/server/src/com/vaadin/server/GlobalResourceHandler.java @@ -65,9 +65,8 @@ public class GlobalResourceHandler 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 { String pathInfo = request.getRequestPathInfo(); if (pathInfo == null) { return false; diff --git a/server/src/com/vaadin/server/LegacyVaadinPortlet.java b/server/src/com/vaadin/server/LegacyVaadinPortlet.java index 067cd6266f..a49bea29c4 100644 --- a/server/src/com/vaadin/server/LegacyVaadinPortlet.java +++ b/server/src/com/vaadin/server/LegacyVaadinPortlet.java @@ -48,21 +48,19 @@ public class LegacyVaadinPortlet extends VaadinPortlet { public void init(PortletConfig portletConfig) throws PortletException { super.init(portletConfig); - getService().addSessionInitListener( - new SessionInitListener() { - @Override - public void sessionInit( - SessionInitEvent event) - throws ServiceException { - try { - onVaadinSessionStarted(VaadinPortletRequest - .cast(event.getRequest()), - (VaadinPortletSession) event.getSession()); - } catch (PortletException e) { - throw new ServiceException(e); - } - } - }); + getService().addSessionInitListener(new SessionInitListener() { + @Override + public void sessionInit(SessionInitEvent event) + throws ServiceException { + try { + onVaadinSessionStarted( + VaadinPortletRequest.cast(event.getRequest()), + (VaadinPortletSession) event.getSession()); + } catch (PortletException e) { + throw new ServiceException(e); + } + } + }); } protected Class<? extends LegacyApplication> getApplicationClass() diff --git a/server/src/com/vaadin/server/LegacyVaadinServlet.java b/server/src/com/vaadin/server/LegacyVaadinServlet.java index 097ab02a6a..6e6bd17bbb 100644 --- a/server/src/com/vaadin/server/LegacyVaadinServlet.java +++ b/server/src/com/vaadin/server/LegacyVaadinServlet.java @@ -49,27 +49,24 @@ public class LegacyVaadinServlet extends VaadinServlet { public void init(ServletConfig servletConfig) throws ServletException { super.init(servletConfig); - getService().addSessionInitListener( - new SessionInitListener() { - @Override - public void sessionInit( - SessionInitEvent event) - throws ServiceException { - try { - onVaadinSessionStarted(event.getRequest(), - event.getSession()); - } catch (ServletException e) { - throw new ServiceException(e); - } - } - }); + getService().addSessionInitListener(new SessionInitListener() { + @Override + public void sessionInit(SessionInitEvent event) + throws ServiceException { + try { + onVaadinSessionStarted(event.getRequest(), + event.getSession()); + } catch (ServletException e) { + throw new ServiceException(e); + } + } + }); } protected Class<? extends LegacyApplication> getApplicationClass() throws ClassNotFoundException { try { - return ServletPortletHelper - .getLegacyApplicationClass(getService()); + return ServletPortletHelper.getLegacyApplicationClass(getService()); } catch (ServiceException e) { throw new RuntimeException(e); } diff --git a/server/src/com/vaadin/server/SessionInitListener.java b/server/src/com/vaadin/server/SessionInitListener.java index b34cf9b095..be86f80a05 100644 --- a/server/src/com/vaadin/server/SessionInitListener.java +++ b/server/src/com/vaadin/server/SessionInitListener.java @@ -46,6 +46,5 @@ public interface SessionInitListener extends Serializable { * @throws ServiceException * a problem occurs when processing the event */ - public void sessionInit(SessionInitEvent event) - throws ServiceException; + public void sessionInit(SessionInitEvent event) throws ServiceException; } diff --git a/server/src/com/vaadin/server/UnsupportedBrowserHandler.java b/server/src/com/vaadin/server/UnsupportedBrowserHandler.java index 8525dc29ca..5c93eabf67 100644 --- a/server/src/com/vaadin/server/UnsupportedBrowserHandler.java +++ b/server/src/com/vaadin/server/UnsupportedBrowserHandler.java @@ -34,9 +34,8 @@ public class UnsupportedBrowserHandler implements RequestHandler { public static final String FORCE_LOAD_COOKIE = "vaadinforceload=1"; @Override - public boolean handleRequest(VaadinSession session, - VaadinRequest request, VaadinResponse response) - throws IOException { + public boolean handleRequest(VaadinSession session, VaadinRequest request, + VaadinResponse response) throws IOException { if (request.getBrowserDetails() != null) { // Check if the browser is supported diff --git a/server/src/com/vaadin/server/VaadinPortlet.java b/server/src/com/vaadin/server/VaadinPortlet.java index cdf7030f98..4ca88fb71c 100644 --- a/server/src/com/vaadin/server/VaadinPortlet.java +++ b/server/src/com/vaadin/server/VaadinPortlet.java @@ -362,8 +362,7 @@ public class VaadinPortlet extends GenericPortlet implements Constants { VaadinPortletResponse vaadinResponse = new VaadinPortletResponse( response, getService()); - getService().setCurrentInstances(vaadinRequest, - vaadinResponse); + getService().setCurrentInstances(vaadinRequest, vaadinResponse); RequestType requestType = getRequestType(vaadinRequest); diff --git a/server/src/com/vaadin/server/VaadinPortletResponse.java b/server/src/com/vaadin/server/VaadinPortletResponse.java index c59af2f2b0..d9fe828bff 100644 --- a/server/src/com/vaadin/server/VaadinPortletResponse.java +++ b/server/src/com/vaadin/server/VaadinPortletResponse.java @@ -29,7 +29,6 @@ import javax.portlet.MimeResponse; import javax.portlet.PortletResponse; import javax.portlet.ResourceResponse; - /** * Wrapper for {@link PortletResponse} and its subclasses. * diff --git a/server/src/com/vaadin/server/VaadinServlet.java b/server/src/com/vaadin/server/VaadinServlet.java index 633cffab2a..b8b7bb936d 100644 --- a/server/src/com/vaadin/server/VaadinServlet.java +++ b/server/src/com/vaadin/server/VaadinServlet.java @@ -822,8 +822,8 @@ public class VaadinServlet extends HttpServlet implements Constants { * cache timeout can be configured by setting the resourceCacheTime * parameter in web.xml */ - int resourceCacheTime = getService() - .getDeploymentConfiguration().getResourceCacheTime(); + int resourceCacheTime = getService().getDeploymentConfiguration() + .getResourceCacheTime(); response.setHeader("Cache-Control", "max-age= " + String.valueOf(resourceCacheTime)); } @@ -850,8 +850,7 @@ public class VaadinServlet extends HttpServlet implements Constants { filename = filename.substring(1); } - resourceUrl = getService().getClassLoader().getResource( - filename); + resourceUrl = getService().getClassLoader().getResource(filename); } return resourceUrl; } diff --git a/server/src/com/vaadin/server/VaadinServletRequest.java b/server/src/com/vaadin/server/VaadinServletRequest.java index 6526766b0f..10627a1338 100644 --- a/server/src/com/vaadin/server/VaadinServletRequest.java +++ b/server/src/com/vaadin/server/VaadinServletRequest.java @@ -20,7 +20,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequestWrapper; import javax.servlet.http.HttpSession; - /** * Wrapper for {@link HttpServletRequest}. * diff --git a/server/src/com/vaadin/server/VaadinServletResponse.java b/server/src/com/vaadin/server/VaadinServletResponse.java index 72d1207ac5..ea7da7cfb5 100644 --- a/server/src/com/vaadin/server/VaadinServletResponse.java +++ b/server/src/com/vaadin/server/VaadinServletResponse.java @@ -19,7 +19,6 @@ package com.vaadin.server; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponseWrapper; - /** * Wrapper for {@link HttpServletResponse}. * diff --git a/server/src/com/vaadin/server/VaadinServletSession.java b/server/src/com/vaadin/server/VaadinServletSession.java index fba0707812..6d2658f8b8 100644 --- a/server/src/com/vaadin/server/VaadinServletSession.java +++ b/server/src/com/vaadin/server/VaadinServletSession.java @@ -24,7 +24,6 @@ import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSessionBindingEvent; import javax.servlet.http.HttpSessionBindingListener; - /** * Web application context for Vaadin applications. * diff --git a/server/src/com/vaadin/ui/Panel.java b/server/src/com/vaadin/ui/Panel.java index 70598f5c14..f73cd5128e 100644 --- a/server/src/com/vaadin/ui/Panel.java +++ b/server/src/com/vaadin/ui/Panel.java @@ -112,9 +112,9 @@ public class Panel extends AbstractComponentContainer implements Scrollable, /** * Sets the caption of the panel. * - * Note that the caption is interpreted as HTML and therefore care - * should be taken not to enable HTML injection and XSS attacks using panel - * captions. This behavior may change in future versions. + * Note that the caption is interpreted as HTML and therefore care should be + * taken not to enable HTML injection and XSS attacks using panel captions. + * This behavior may change in future versions. * * @see AbstractComponent#setCaption(String) */ diff --git a/server/tests/src/com/vaadin/data/util/sqlcontainer/generator/SQLGeneratorsTest.java b/server/tests/src/com/vaadin/data/util/sqlcontainer/generator/SQLGeneratorsTest.java index 2db31dc13f..59e879a8e0 100644 --- a/server/tests/src/com/vaadin/data/util/sqlcontainer/generator/SQLGeneratorsTest.java +++ b/server/tests/src/com/vaadin/data/util/sqlcontainer/generator/SQLGeneratorsTest.java @@ -13,10 +13,10 @@ import org.junit.Test; import com.vaadin.data.Container.Filter; import com.vaadin.data.util.filter.Like; import com.vaadin.data.util.filter.Or; -import com.vaadin.data.util.sqlcontainer.SQLTestsConstants; import com.vaadin.data.util.sqlcontainer.DataGenerator; import com.vaadin.data.util.sqlcontainer.RowItem; import com.vaadin.data.util.sqlcontainer.SQLContainer; +import com.vaadin.data.util.sqlcontainer.SQLTestsConstants; import com.vaadin.data.util.sqlcontainer.connection.JDBCConnectionPool; import com.vaadin.data.util.sqlcontainer.connection.SimpleJDBCConnectionPool; import com.vaadin.data.util.sqlcontainer.query.OrderBy; diff --git a/server/tests/src/com/vaadin/data/util/sqlcontainer/query/FreeformQueryTest.java b/server/tests/src/com/vaadin/data/util/sqlcontainer/query/FreeformQueryTest.java index acb3651bd4..195911475e 100644 --- a/server/tests/src/com/vaadin/data/util/sqlcontainer/query/FreeformQueryTest.java +++ b/server/tests/src/com/vaadin/data/util/sqlcontainer/query/FreeformQueryTest.java @@ -16,12 +16,12 @@ import org.junit.Test; import com.vaadin.data.Container.Filter; import com.vaadin.data.util.filter.Like; -import com.vaadin.data.util.sqlcontainer.SQLTestsConstants; -import com.vaadin.data.util.sqlcontainer.SQLTestsConstants.DB; import com.vaadin.data.util.sqlcontainer.DataGenerator; import com.vaadin.data.util.sqlcontainer.RowId; import com.vaadin.data.util.sqlcontainer.RowItem; import com.vaadin.data.util.sqlcontainer.SQLContainer; +import com.vaadin.data.util.sqlcontainer.SQLTestsConstants; +import com.vaadin.data.util.sqlcontainer.SQLTestsConstants.DB; import com.vaadin.data.util.sqlcontainer.connection.JDBCConnectionPool; import com.vaadin.data.util.sqlcontainer.connection.SimpleJDBCConnectionPool; diff --git a/server/tests/src/com/vaadin/data/util/sqlcontainer/query/TableQueryTest.java b/server/tests/src/com/vaadin/data/util/sqlcontainer/query/TableQueryTest.java index 2b0e484b06..54db34dfd2 100644 --- a/server/tests/src/com/vaadin/data/util/sqlcontainer/query/TableQueryTest.java +++ b/server/tests/src/com/vaadin/data/util/sqlcontainer/query/TableQueryTest.java @@ -17,12 +17,12 @@ import org.junit.Test; import com.vaadin.data.Container.Filter; import com.vaadin.data.util.filter.Compare.Equal; import com.vaadin.data.util.filter.Like; -import com.vaadin.data.util.sqlcontainer.SQLTestsConstants; -import com.vaadin.data.util.sqlcontainer.SQLTestsConstants.DB; import com.vaadin.data.util.sqlcontainer.DataGenerator; import com.vaadin.data.util.sqlcontainer.OptimisticLockException; import com.vaadin.data.util.sqlcontainer.RowItem; import com.vaadin.data.util.sqlcontainer.SQLContainer; +import com.vaadin.data.util.sqlcontainer.SQLTestsConstants; +import com.vaadin.data.util.sqlcontainer.SQLTestsConstants.DB; import com.vaadin.data.util.sqlcontainer.connection.JDBCConnectionPool; import com.vaadin.data.util.sqlcontainer.connection.SimpleJDBCConnectionPool; import com.vaadin.data.util.sqlcontainer.query.generator.DefaultSQLGenerator; diff --git a/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java b/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java index b929ce5d9d..5078dd2f66 100644 --- a/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java +++ b/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java @@ -6,8 +6,8 @@ import org.easymock.EasyMock; import com.vaadin.server.CommunicationManager; import com.vaadin.server.StreamVariable; -import com.vaadin.server.VaadinSession; import com.vaadin.server.VaadinRequest; +import com.vaadin.server.VaadinSession; import com.vaadin.ui.UI; import com.vaadin.ui.Upload; 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 693fcd0580..462eec2239 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 @@ -7,8 +7,8 @@ import org.junit.Test; import com.vaadin.data.Property; import com.vaadin.data.util.AbstractProperty; import com.vaadin.data.util.converter.Converter.ConversionException; -import com.vaadin.server.VaadinSession; import com.vaadin.server.VaadinRequest; +import com.vaadin.server.VaadinSession; import com.vaadin.ui.AbstractField; import com.vaadin.ui.UI; diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/AddComponentsTest.java b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/AddComponentsTest.java index 81c29995f5..36e54a2826 100644 --- a/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/AddComponentsTest.java +++ b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/AddComponentsTest.java @@ -113,11 +113,11 @@ public class AddComponentsTest { HorizontalLayout layout1 = new HorizontalLayout(); layout1.addComponents(children); assertOrder(layout1, new int[] { 0, 1, 2, 3 }); - + Label extra = new Label("Extra"); layout1.addComponents(extra); assertSame(extra, layout1.getComponent(4)); - + layout1.removeAllComponents(); layout1.addComponents(children[3], children[2], children[1], children[0]); @@ -126,10 +126,10 @@ public class AddComponentsTest { VerticalLayout layout2 = new VerticalLayout(children); layout2.addComponents(children); assertOrder(layout2, new int[] { 0, 1, 2, 3 }); - + layout2.addComponents(extra); assertSame(extra, layout2.getComponent(4)); - + layout2.removeAllComponents(); layout2.addComponents(children[3], children[2], children[1], children[0]); diff --git a/server/tests/src/com/vaadin/tests/server/component/csslayout/AddComponentsTest.java b/server/tests/src/com/vaadin/tests/server/component/csslayout/AddComponentsTest.java index 120cf20070..441f743214 100644 --- a/server/tests/src/com/vaadin/tests/server/component/csslayout/AddComponentsTest.java +++ b/server/tests/src/com/vaadin/tests/server/component/csslayout/AddComponentsTest.java @@ -102,11 +102,11 @@ public class AddComponentsTest { CssLayout layout = new CssLayout(); layout.addComponents(children); assertOrder(layout, new int[] { 0, 1, 2, 3 }); - + Label extra = new Label("Extra"); layout.addComponents(extra); assertSame(extra, layout.getComponent(4)); - + layout.removeAllComponents(); layout.addComponents(children[3], children[2], children[1], children[0]); assertOrder(layout, new int[] { 3, 2, 1, 0 }); diff --git a/server/tests/src/com/vaadin/tests/server/component/root/CustomUIClassLoader.java b/server/tests/src/com/vaadin/tests/server/component/root/CustomUIClassLoader.java index c7730e9294..40ee6604f6 100644 --- a/server/tests/src/com/vaadin/tests/server/component/root/CustomUIClassLoader.java +++ b/server/tests/src/com/vaadin/tests/server/component/root/CustomUIClassLoader.java @@ -81,8 +81,7 @@ public class CustomUIClassLoader extends TestCase { // Mock a VaadinRequest to give the mocked vaadin service VaadinRequest requestMock = EasyMock.createMock(VaadinRequest.class); - EasyMock.expect(requestMock.getService()).andReturn( - configurationMock); + EasyMock.expect(requestMock.getService()).andReturn(configurationMock); EasyMock.replay(configurationMock, requestMock); return requestMock; diff --git a/server/tests/src/com/vaadin/tests/server/component/window/AttachDetachWindow.java b/server/tests/src/com/vaadin/tests/server/component/window/AttachDetachWindow.java index 09cb75a9eb..3eebc7cdf8 100644 --- a/server/tests/src/com/vaadin/tests/server/component/window/AttachDetachWindow.java +++ b/server/tests/src/com/vaadin/tests/server/component/window/AttachDetachWindow.java @@ -6,8 +6,8 @@ import static org.junit.Assert.assertTrue; import org.junit.Test; import com.vaadin.server.ClientConnector; -import com.vaadin.server.VaadinSession; import com.vaadin.server.VaadinRequest; +import com.vaadin.server.VaadinSession; import com.vaadin.ui.Label; import com.vaadin.ui.UI; import com.vaadin.ui.VerticalLayout; diff --git a/server/tests/src/com/vaadin/ui/LabelDataSource.java b/server/tests/src/com/vaadin/ui/LabelDataSource.java index 932e0cc8ef..fa21fbefc3 100644 --- a/server/tests/src/com/vaadin/ui/LabelDataSource.java +++ b/server/tests/src/com/vaadin/ui/LabelDataSource.java @@ -22,8 +22,8 @@ import org.junit.Before; import org.junit.Test; import com.vaadin.data.util.ObjectProperty; -import com.vaadin.server.VaadinSession; import com.vaadin.server.VaadinRequest; +import com.vaadin.server.VaadinSession; public class LabelDataSource { diff --git a/shared/src/com/vaadin/shared/ui/label/ContentMode.java b/shared/src/com/vaadin/shared/ui/label/ContentMode.java index efdb1acde0..4ae997d5c2 100644 --- a/shared/src/com/vaadin/shared/ui/label/ContentMode.java +++ b/shared/src/com/vaadin/shared/ui/label/ContentMode.java @@ -15,7 +15,6 @@ */ package com.vaadin.shared.ui.label; - /** * Content modes defining how the client should interpret a Label's value. * diff --git a/theme-compiler/src/com/vaadin/sass/handler/SCSSDocumentHandlerImpl.java b/theme-compiler/src/com/vaadin/sass/handler/SCSSDocumentHandlerImpl.java index 3378903c4d..c10d29aad9 100644 --- a/theme-compiler/src/com/vaadin/sass/handler/SCSSDocumentHandlerImpl.java +++ b/theme-compiler/src/com/vaadin/sass/handler/SCSSDocumentHandlerImpl.java @@ -197,6 +197,7 @@ public class SCSSDocumentHandlerImpl implements SCSSDocumentHandler { property(name, (LexicalUnitImpl) value, important, null); } + @Override public void property(String name, LexicalUnitImpl value, boolean important, String comment) { RuleNode node = new RuleNode(name, value, important, comment); diff --git a/theme-compiler/src/com/vaadin/sass/tree/ListRemoveNode.java b/theme-compiler/src/com/vaadin/sass/tree/ListRemoveNode.java index 9c6400ec02..114e095a9c 100644 --- a/theme-compiler/src/com/vaadin/sass/tree/ListRemoveNode.java +++ b/theme-compiler/src/com/vaadin/sass/tree/ListRemoveNode.java @@ -42,7 +42,7 @@ public class ListRemoveNode extends Node implements ListModifyNode, VariableNode clone = (VariableNode) DeepCopy.copy(variableNode); LexicalUnitImpl first = null; - LexicalUnitImpl current = (LexicalUnitImpl) clone.getExpr(); + LexicalUnitImpl current = clone.getExpr(); LexicalUnitImpl lastAccepted = null; while (current != null) { @@ -60,7 +60,7 @@ public class ListRemoveNode extends Node implements ListModifyNode, first = lastAccepted; } } - current = (LexicalUnitImpl) current.getNextLexicalUnit(); + current = current.getNextLexicalUnit(); } clone.setExpr(first); diff --git a/theme-compiler/src/com/vaadin/sass/tree/VariableNode.java b/theme-compiler/src/com/vaadin/sass/tree/VariableNode.java index ffe6b77896..6f97fd6f2c 100644 --- a/theme-compiler/src/com/vaadin/sass/tree/VariableNode.java +++ b/theme-compiler/src/com/vaadin/sass/tree/VariableNode.java @@ -77,7 +77,7 @@ public class VariableNode extends Node implements IVariableNode { @Override public void replaceVariables(ArrayList<VariableNode> variables) { for (final VariableNode node : variables) { - if (!this.equals(node)) { + if (!equals(node)) { if (name.equals(node.getName())) { expr = (LexicalUnitImpl) DeepCopy.copy(node.getExpr()); diff --git a/theme-compiler/src/com/vaadin/sass/tree/controldirective/EachDefNode.java b/theme-compiler/src/com/vaadin/sass/tree/controldirective/EachDefNode.java index f75d5ed7b5..cb209273cb 100644 --- a/theme-compiler/src/com/vaadin/sass/tree/controldirective/EachDefNode.java +++ b/theme-compiler/src/com/vaadin/sass/tree/controldirective/EachDefNode.java @@ -67,7 +67,7 @@ public class EachDefNode extends Node implements IVariableNode { for (final VariableNode var : variables) { if (listVariable.equals(var.getName())) { - LexicalUnitImpl current = (LexicalUnitImpl) var.getExpr(); + LexicalUnitImpl current = var.getExpr(); list = new ArrayList<String>(); while (current != null) { @@ -75,8 +75,7 @@ public class EachDefNode extends Node implements IVariableNode { && current.getLexicalUnitType() != LexicalUnitImpl.SAC_OPERATOR_COMMA) { list.add(current.getValue().toString()); } - current = (LexicalUnitImpl) current - .getNextLexicalUnit(); + current = current.getNextLexicalUnit(); } listVariable = null; break; diff --git a/theme-compiler/src/com/vaadin/sass/util/ColorUtil.java b/theme-compiler/src/com/vaadin/sass/util/ColorUtil.java index 25e29ff9a2..7377b202ab 100644 --- a/theme-compiler/src/com/vaadin/sass/util/ColorUtil.java +++ b/theme-compiler/src/com/vaadin/sass/util/ColorUtil.java @@ -40,12 +40,11 @@ public class ColorUtil { LexicalUnitImpl hslParams = createHslParameters(hsl[0], hsl[1], hsl[2], hexColor.getLineNumber(), hexColor.getColumnNumber(), - (LexicalUnitImpl) hexColor.getPreviousLexicalUnit()); + hexColor.getPreviousLexicalUnit()); return LexicalUnitImpl.createFunction(hexColor.getLineNumber(), - hexColor.getColumnNumber(), - (LexicalUnitImpl) hexColor.getPreviousLexicalUnit(), "hsl", - hslParams); + hexColor.getColumnNumber(), hexColor.getPreviousLexicalUnit(), + "hsl", hslParams); } public static LexicalUnitImpl hslToHexColor(LexicalUnitImpl hsl, int lengh) { @@ -64,8 +63,7 @@ public class ColorUtil { builder.append(color); } return LexicalUnitImpl.createIdent(hsl.getLineNumber(), - hsl.getColumnNumber(), - (LexicalUnitImpl) hsl.getPreviousLexicalUnit(), + hsl.getColumnNumber(), hsl.getPreviousLexicalUnit(), builder.toString()); } @@ -90,7 +88,7 @@ public class ColorUtil { case 3: break; } - hslParam = (LexicalUnitImpl) hslParam.getNextLexicalUnit(); + hslParam = hslParam.getNextLexicalUnit(); i++; } float h = ((hue.getIntegerValue() % 360) + 360) % 360 / 360f; @@ -127,7 +125,7 @@ public class ColorUtil { case 3: break; } - rgbParam = (LexicalUnitImpl) rgbParam.getNextLexicalUnit(); + rgbParam = rgbParam.getNextLexicalUnit(); i++; } @@ -138,11 +136,10 @@ public class ColorUtil { LexicalUnitImpl hslParams = createHslParameters(hsl[0], hsl[1], hsl[2], rgbParam.getLineNumber(), rgbParam.getColumnNumber(), - (LexicalUnitImpl) rgbParam.getPreviousLexicalUnit()); + rgbParam.getPreviousLexicalUnit()); return LexicalUnitImpl.createFunction(rgb.getLineNumber(), - rgb.getColumnNumber(), - (LexicalUnitImpl) rgb.getPreviousLexicalUnit(), "hsl", + rgb.getColumnNumber(), rgb.getPreviousLexicalUnit(), "hsl", hslParams); } @@ -192,11 +189,10 @@ public class ColorUtil { LexicalUnitImpl hslParam = hsl.getParameters(); LexicalUnitImpl rgbParams = createRgbParameters(rgb[0], rgb[1], rgb[2], hslParam.getLineNumber(), hslParam.getColumnNumber(), - (LexicalUnitImpl) hslParam.getPreviousLexicalUnit()); + hslParam.getPreviousLexicalUnit()); return LexicalUnitImpl.createFunction(hsl.getLineNumber(), - hsl.getColumnNumber(), - (LexicalUnitImpl) hsl.getPreviousLexicalUnit(), "rgb", + hsl.getColumnNumber(), hsl.getPreviousLexicalUnit(), "rgb", rgbParams); } @@ -246,8 +242,7 @@ public class ColorUtil { public static LexicalUnitImpl darken(LexicalUnitImpl darkenFunc) { LexicalUnitImpl color = darkenFunc.getParameters(); float amount = getAmountValue(color); - LexicalUnitImpl pre = (LexicalUnitImpl) darkenFunc - .getPreviousLexicalUnit(); + LexicalUnitImpl pre = darkenFunc.getPreviousLexicalUnit(); return adjust(color, amount, ColorOperation.Darken, pre); } @@ -293,8 +288,7 @@ public class ColorUtil { public static LexicalUnitImpl lighten(LexicalUnitImpl lightenFunc) { LexicalUnitImpl color = lightenFunc.getParameters(); float amount = getAmountValue(color); - LexicalUnitImpl pre = (LexicalUnitImpl) lightenFunc - .getPreviousLexicalUnit(); + LexicalUnitImpl pre = lightenFunc.getPreviousLexicalUnit(); return adjust(color, amount, ColorOperation.Lighten, pre); } diff --git a/theme-compiler/src/com/vaadin/sass/visitor/EachVisitor.java b/theme-compiler/src/com/vaadin/sass/visitor/EachVisitor.java index cc7e4e5930..e2da712b6a 100644 --- a/theme-compiler/src/com/vaadin/sass/visitor/EachVisitor.java +++ b/theme-compiler/src/com/vaadin/sass/visitor/EachVisitor.java @@ -15,7 +15,7 @@ public class EachVisitor implements Visitor { @Override public void traverse(Node node) throws Exception { - this.rootNode = node; + rootNode = node; for (Node child : node.getChildren()) { if (child instanceof EachDefNode) { controlDefs.add((EachDefNode) child); diff --git a/theme-compiler/src/com/vaadin/sass/visitor/VariableVisitor.java b/theme-compiler/src/com/vaadin/sass/visitor/VariableVisitor.java index 50143180d2..d20914b32d 100644 --- a/theme-compiler/src/com/vaadin/sass/visitor/VariableVisitor.java +++ b/theme-compiler/src/com/vaadin/sass/visitor/VariableVisitor.java @@ -24,7 +24,6 @@ import com.vaadin.sass.tree.IVariableNode; import com.vaadin.sass.tree.ListModifyNode; import com.vaadin.sass.tree.Node; import com.vaadin.sass.tree.VariableNode; -import com.vaadin.sass.util.DeepCopy; public class VariableVisitor implements Visitor { diff --git a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java index 1883910b7b..05edc506a9 100644 --- a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java +++ b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java @@ -33,14 +33,14 @@ import com.vaadin.LegacyApplication; import com.vaadin.server.DeploymentConfiguration; import com.vaadin.server.LegacyVaadinServlet; import com.vaadin.server.ServiceException; +import com.vaadin.server.SessionInitEvent; +import com.vaadin.server.SessionInitListener; import com.vaadin.server.UIClassSelectionEvent; import com.vaadin.server.UIProvider; import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinServletRequest; import com.vaadin.server.VaadinServletService; import com.vaadin.server.VaadinSession; -import com.vaadin.server.SessionInitListener; -import com.vaadin.server.SessionInitEvent; import com.vaadin.tests.components.TestBase; import com.vaadin.ui.UI; @@ -76,16 +76,13 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet { @Override protected void servletInitialized() { super.servletInitialized(); - getService().addSessionInitListener( - new SessionInitListener() { - @Override - public void sessionInit( - SessionInitEvent event) - throws ServiceException { - onVaadinSessionStarted(event.getRequest(), - event.getSession()); - } - }); + getService().addSessionInitListener(new SessionInitListener() { + @Override + public void sessionInit(SessionInitEvent event) + throws ServiceException { + onVaadinSessionStarted(event.getRequest(), event.getSession()); + } + }); } private void addDirectories(File parent, LinkedHashSet<String> packages, diff --git a/uitest/src/com/vaadin/tests/Parameters.java b/uitest/src/com/vaadin/tests/Parameters.java index 300573424e..45a3ae311a 100644 --- a/uitest/src/com/vaadin/tests/Parameters.java +++ b/uitest/src/com/vaadin/tests/Parameters.java @@ -23,9 +23,9 @@ import java.util.Map; import com.vaadin.server.ExternalResource; import com.vaadin.server.RequestHandler; -import com.vaadin.server.VaadinSession; import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinResponse; +import com.vaadin.server.VaadinSession; import com.vaadin.ui.Label; import com.vaadin.ui.Layout.MarginHandler; import com.vaadin.ui.Link; @@ -106,9 +106,8 @@ public class Parameters extends com.vaadin.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.getRequestPathInfo()); diff --git a/uitest/src/com/vaadin/tests/TreeFilesystemContainer.java b/uitest/src/com/vaadin/tests/TreeFilesystemContainer.java index deeb22cb5b..b81b14365c 100644 --- a/uitest/src/com/vaadin/tests/TreeFilesystemContainer.java +++ b/uitest/src/com/vaadin/tests/TreeFilesystemContainer.java @@ -41,8 +41,8 @@ import com.vaadin.ui.VerticalLayout; * @since 4.0.0 * */ -public class TreeFilesystemContainer extends com.vaadin.LegacyApplication implements - Listener { +public class TreeFilesystemContainer extends com.vaadin.LegacyApplication + implements Listener { // Filesystem explorer panel and it's components private final Panel explorerPanel = new Panel("Filesystem explorer"); diff --git a/uitest/src/com/vaadin/tests/UsingObjectsInSelect.java b/uitest/src/com/vaadin/tests/UsingObjectsInSelect.java index 1307e6eab8..c2fc4936d4 100644 --- a/uitest/src/com/vaadin/tests/UsingObjectsInSelect.java +++ b/uitest/src/com/vaadin/tests/UsingObjectsInSelect.java @@ -27,8 +27,8 @@ import com.vaadin.ui.Panel; import com.vaadin.ui.Select; import com.vaadin.ui.UI.LegacyWindow; -public class UsingObjectsInSelect extends com.vaadin.LegacyApplication implements - ValueChangeListener { +public class UsingObjectsInSelect extends com.vaadin.LegacyApplication + implements ValueChangeListener { private final Select select = new Select(); private final Label selectedTask = new Label("Selected task", diff --git a/uitest/src/com/vaadin/tests/application/ThreadLocalInstances.java b/uitest/src/com/vaadin/tests/application/ThreadLocalInstances.java index 7d755a942b..f2d2c2f595 100644 --- a/uitest/src/com/vaadin/tests/application/ThreadLocalInstances.java +++ b/uitest/src/com/vaadin/tests/application/ThreadLocalInstances.java @@ -2,8 +2,8 @@ package com.vaadin.tests.application; import com.vaadin.server.DownloadStream; import com.vaadin.server.PaintException; -import com.vaadin.server.VaadinSession; import com.vaadin.server.VaadinRequest; +import com.vaadin.server.VaadinSession; import com.vaadin.tests.components.AbstractTestCase; import com.vaadin.tests.integration.FlagSeResource; import com.vaadin.tests.util.Log; diff --git a/uitest/src/com/vaadin/tests/components/AbstractTestUI.java b/uitest/src/com/vaadin/tests/components/AbstractTestUI.java index 4c4dff572a..480fd2df57 100644 --- a/uitest/src/com/vaadin/tests/components/AbstractTestUI.java +++ b/uitest/src/com/vaadin/tests/components/AbstractTestUI.java @@ -1,7 +1,7 @@ package com.vaadin.tests.components; -import com.vaadin.server.WebBrowser; import com.vaadin.server.VaadinRequest; +import com.vaadin.server.WebBrowser; import com.vaadin.shared.ui.label.ContentMode; import com.vaadin.ui.Component; import com.vaadin.ui.Label; diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldExtendedRange.java b/uitest/src/com/vaadin/tests/components/datefield/DateFieldExtendedRange.java index e420278148..8a15d83121 100644 --- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldExtendedRange.java +++ b/uitest/src/com/vaadin/tests/components/datefield/DateFieldExtendedRange.java @@ -48,6 +48,7 @@ public class DateFieldExtendedRange extends TestBase { addComponent(layout); addComponent(new Button("Change date", new ClickListener() { + @Override public void buttonClick(ClickEvent event) { date.set(2010, 1, 16); for (DateField f : fields) { diff --git a/uitest/src/com/vaadin/tests/components/label/LabelPropertySourceValue.java b/uitest/src/com/vaadin/tests/components/label/LabelPropertySourceValue.java index 8914daf390..d4ec16da4e 100644 --- a/uitest/src/com/vaadin/tests/components/label/LabelPropertySourceValue.java +++ b/uitest/src/com/vaadin/tests/components/label/LabelPropertySourceValue.java @@ -17,6 +17,7 @@ public class LabelPropertySourceValue extends AbstractTestUI { addComponent(label);
Button button = new Button("Give label a new property data source...");
button.addClickListener(new ClickListener() {
+ @Override
public void buttonClick(ClickEvent event) {
ObjectProperty<String> p = new ObjectProperty<String>(
"This text should appear on the label after clicking the button.");
diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java b/uitest/src/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java index 1ffa1cad88..ba5701e699 100644 --- a/uitest/src/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java +++ b/uitest/src/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java @@ -121,40 +121,40 @@ public class BoxLayoutTest extends AbstractTestUI { Button addComponent = new Button("Add Component", new Button.ClickListener() { - @Override - public void buttonClick(ClickEvent event) { - GridLayout grid = new GridLayout(2, 2); - Button grow = new Button("Grow Me", - new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { - if (event.getButton().getWidth() == -1) { - event.getButton().setHeight("50px"); - event.getButton().setWidth("200px"); - } else { - event.getButton() - .setSizeUndefined(); - } + GridLayout grid = new GridLayout(2, 2); + Button grow = new Button("Grow Me", + new Button.ClickListener() { + @Override + public void buttonClick(ClickEvent event) { + if (event.getButton().getWidth() == -1) { + event.getButton().setHeight("50px"); + event.getButton().setWidth("200px"); + } else { + event.getButton() + .setSizeUndefined(); + } + } + }); + grid.addComponent(new Label("Grid cell 1")); + grid.addComponent(new Label("Grid cell 2")); + grid.addComponent(grow); + grid.addComponent(new Label("Grid cell 4")); + l.addComponent(grid); + // l.addComponent(new TextField("Some field")); } }); - grid.addComponent(new Label("Grid cell 1")); - grid.addComponent(new Label("Grid cell 2")); - grid.addComponent(grow); - grid.addComponent(new Label("Grid cell 4")); - l.addComponent(grid); - // l.addComponent(new TextField("Some field")); - } - }); header.addComponent(addComponent); Button removeComponent = new Button("Remove Component", new Button.ClickListener() { - @Override - public void buttonClick(ClickEvent event) { - Component last = l.getComponent(l.getComponentCount() - 1); - l.removeComponent(last); - } - }); + @Override + public void buttonClick(ClickEvent event) { + Component last = l.getComponent(l.getComponentCount() - 1); + l.removeComponent(last); + } + }); header.addComponent(removeComponent); // Second row @@ -430,15 +430,15 @@ public class BoxLayoutTest extends AbstractTestUI { if (target != null) { if (target.getWidth() > -1) { componentWidth.select(new Float(target.getWidth()) - .intValue() - + target.getWidthUnits().getSymbol()); + .intValue() + + target.getWidthUnits().getSymbol()); } else { componentWidth.select(null); } if (target.getHeight() > -1) { componentHeight.select(new Float(target.getHeight()) - .intValue() - + target.getHeightUnits().getSymbol()); + .intValue() + + target.getHeightUnits().getSymbol()); } else { componentHeight.select(null); } diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/VaadinTunesLayout.java b/uitest/src/com/vaadin/tests/components/orderedlayout/VaadinTunesLayout.java index 82fc8933a0..fcc9792a7d 100644 --- a/uitest/src/com/vaadin/tests/components/orderedlayout/VaadinTunesLayout.java +++ b/uitest/src/com/vaadin/tests/components/orderedlayout/VaadinTunesLayout.java @@ -256,7 +256,7 @@ public class VaadinTunesLayout extends AbstractTestUI { "Bullet For My Valentine", "Chasing Victory", "Chimaira", "Danko Jones", "Deadlock", "Deftones", "From Autumn To Ashes", "Haste The Day", "Four Year Strong", "In Flames", "Kemopetrol", - "John Legend" }; + "John Legend" }; String[] albums = new String[] { "Once Again", "The Caitiff Choir", "The Devil And God", "Light Grenades", "Dicthonomy", "Back In Black", "Dreamer", "Come Clarity", "Year Zero", @@ -265,7 +265,7 @@ public class VaadinTunesLayout extends AbstractTestUI { String[] genres = new String[] { "Rock", "Metal", "Hardcore", "Indie", "Pop", "Alternative", "Blues", "Jazz", "Hip Hop", "Electronica", "Punk", "Hard Rock", "Dance", "R'n'B", "Gospel", - "Country" }; + "Country" }; for (int i = 0; i < 1000; i++) { NativeSelect s = new NativeSelect(); s.addItem("1 star"); diff --git a/uitest/src/com/vaadin/tests/components/table/TableReduceContainerSize.java b/uitest/src/com/vaadin/tests/components/table/TableReduceContainerSize.java index bc729ef042..30db12371d 100644 --- a/uitest/src/com/vaadin/tests/components/table/TableReduceContainerSize.java +++ b/uitest/src/com/vaadin/tests/components/table/TableReduceContainerSize.java @@ -26,11 +26,13 @@ public class TableReduceContainerSize extends TestBase { } private static class DecimateFilter implements Filter { + @Override public boolean passesFilter(Object itemId, Item item) throws UnsupportedOperationException { return ((((TestObject) itemId).property3 % 10) == 0); } + @Override public boolean appliesToProperty(Object propertyId) { return true; } @@ -63,6 +65,7 @@ public class TableReduceContainerSize extends TestBase { addComponent(label); Button button = new Button("Click"); button.addListener(new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { try { reduceData = !reduceData; @@ -78,6 +81,7 @@ public class TableReduceContainerSize extends TestBase { addComponent(button); Button button2 = new Button("Filter"); button2.addListener(new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { try { if (filter != null) { diff --git a/uitest/src/com/vaadin/tests/components/uitest/components/TablesCssTest.java b/uitest/src/com/vaadin/tests/components/uitest/components/TablesCssTest.java index 754b359dbf..2d77354174 100644 --- a/uitest/src/com/vaadin/tests/components/uitest/components/TablesCssTest.java +++ b/uitest/src/com/vaadin/tests/components/uitest/components/TablesCssTest.java @@ -72,6 +72,7 @@ public class TablesCssTest extends GridLayout { // Actions (a.k.a context menu) t.addActionHandler(new Action.Handler() { + @Override public Action[] getActions(Object target, Object sender) { if (markedRows.contains(target)) { return ACTIONS_MARKED; diff --git a/uitest/src/com/vaadin/tests/components/window/AttachShouldBeCalledForSubWindows.java b/uitest/src/com/vaadin/tests/components/window/AttachShouldBeCalledForSubWindows.java index 33eb310822..686daca27e 100644 --- a/uitest/src/com/vaadin/tests/components/window/AttachShouldBeCalledForSubWindows.java +++ b/uitest/src/com/vaadin/tests/components/window/AttachShouldBeCalledForSubWindows.java @@ -1,8 +1,8 @@ package com.vaadin.tests.components.window; import com.vaadin.event.ShortcutAction.KeyCode; -import com.vaadin.server.VaadinService; import com.vaadin.server.VaadinRequest; +import com.vaadin.server.VaadinService; import com.vaadin.tests.components.AbstractTestCase; import com.vaadin.tests.util.Log; import com.vaadin.ui.Button; diff --git a/uitest/src/com/vaadin/tests/containers/sqlcontainer/DatabaseHelper.java b/uitest/src/com/vaadin/tests/containers/sqlcontainer/DatabaseHelper.java index 5b3b91da63..287d772901 100644 --- a/uitest/src/com/vaadin/tests/containers/sqlcontainer/DatabaseHelper.java +++ b/uitest/src/com/vaadin/tests/containers/sqlcontainer/DatabaseHelper.java @@ -4,8 +4,8 @@ import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; -import com.vaadin.data.util.sqlcontainer.SQLTestsConstants; import com.vaadin.data.util.sqlcontainer.SQLContainer; +import com.vaadin.data.util.sqlcontainer.SQLTestsConstants; import com.vaadin.data.util.sqlcontainer.connection.JDBCConnectionPool; import com.vaadin.data.util.sqlcontainer.connection.SimpleJDBCConnectionPool; import com.vaadin.data.util.sqlcontainer.query.TableQuery; diff --git a/uitest/src/com/vaadin/tests/integration/PortletSizeInLiferayFreeformLayoutApplication.java b/uitest/src/com/vaadin/tests/integration/PortletSizeInLiferayFreeformLayoutApplication.java index af51560593..897649fcc2 100644 --- a/uitest/src/com/vaadin/tests/integration/PortletSizeInLiferayFreeformLayoutApplication.java +++ b/uitest/src/com/vaadin/tests/integration/PortletSizeInLiferayFreeformLayoutApplication.java @@ -11,7 +11,8 @@ import com.vaadin.ui.VerticalLayout; * * See ticket #5521. */ -public class PortletSizeInLiferayFreeformLayoutApplication extends LegacyApplication { +public class PortletSizeInLiferayFreeformLayoutApplication extends + LegacyApplication { @Override public void init() { LegacyWindow mainWindow = new LegacyWindow("Portlet5521 Application"); diff --git a/uitest/src/com/vaadin/tests/layouts/layouttester/HorizontalLayoutTests.java b/uitest/src/com/vaadin/tests/layouts/layouttester/HorizontalLayoutTests.java index eb9b0f1dcf..0d5f187136 100644 --- a/uitest/src/com/vaadin/tests/layouts/layouttester/HorizontalLayoutTests.java +++ b/uitest/src/com/vaadin/tests/layouts/layouttester/HorizontalLayoutTests.java @@ -114,8 +114,7 @@ public class HorizontalLayoutTests extends AbstractLayoutTests { source.addComponent(new Label("OTHER LABEL 2")); final AbstractComponent c1 = new Button("BUTTON"); - final AbstractComponent c2 = new Label("<b>LABEL</b>", - ContentMode.HTML); + final AbstractComponent c2 = new Label("<b>LABEL</b>", ContentMode.HTML); final AbstractComponent c3 = new Table("TABLE"); c3.setHeight("100px"); c3.setWidth("100%"); diff --git a/uitest/src/com/vaadin/tests/layouts/layouttester/VerticalLayoutTests.java b/uitest/src/com/vaadin/tests/layouts/layouttester/VerticalLayoutTests.java index 73af3e4a5e..bd3f2b2543 100644 --- a/uitest/src/com/vaadin/tests/layouts/layouttester/VerticalLayoutTests.java +++ b/uitest/src/com/vaadin/tests/layouts/layouttester/VerticalLayoutTests.java @@ -115,8 +115,7 @@ public class VerticalLayoutTests extends AbstractLayoutTests { source.addComponent(new Label("OTHER LABEL 2")); final AbstractComponent c1 = new Button("BUTTON"); - final AbstractComponent c2 = new Label("<b>LABEL</b>", - ContentMode.HTML); + final AbstractComponent c2 = new Label("<b>LABEL</b>", ContentMode.HTML); final AbstractComponent c3 = new Table("TABLE"); c3.setHeight("100px"); c3.setWidth("100%"); diff --git a/uitest/src/com/vaadin/tests/minitutorials/v7a1/DynamicImageUI.java b/uitest/src/com/vaadin/tests/minitutorials/v7a1/DynamicImageUI.java index 8ab2796da4..3d73c3fe98 100644 --- a/uitest/src/com/vaadin/tests/minitutorials/v7a1/DynamicImageUI.java +++ b/uitest/src/com/vaadin/tests/minitutorials/v7a1/DynamicImageUI.java @@ -9,9 +9,9 @@ import javax.imageio.ImageIO; import com.vaadin.server.ExternalResource; import com.vaadin.server.RequestHandler; -import com.vaadin.server.VaadinSession; import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinResponse; +import com.vaadin.server.VaadinSession; import com.vaadin.tests.components.AbstractTestUI; import com.vaadin.ui.Embedded; @@ -56,9 +56,8 @@ class DynamicImageRequestHandler implements RequestHandler { public static final String IMAGE_URL = "myimage.png"; @Override - public boolean handleRequest(VaadinSession session, - VaadinRequest request, VaadinResponse response) - throws IOException { + public boolean handleRequest(VaadinSession session, VaadinRequest request, + VaadinResponse response) throws IOException { String pathInfo = request.getRequestPathInfo(); if (("/" + IMAGE_URL).equals(pathInfo)) { // Create an image, draw the "text" parameter to it and output it to diff --git a/uitest/src/com/vaadin/tests/minitutorials/v7a1/FindCurrentUI.java b/uitest/src/com/vaadin/tests/minitutorials/v7a1/FindCurrentUI.java index cc1bc8c77b..2df38d7b33 100644 --- a/uitest/src/com/vaadin/tests/minitutorials/v7a1/FindCurrentUI.java +++ b/uitest/src/com/vaadin/tests/minitutorials/v7a1/FindCurrentUI.java @@ -16,8 +16,8 @@ package com.vaadin.tests.minitutorials.v7a1; -import com.vaadin.server.VaadinSession; import com.vaadin.server.VaadinRequest; +import com.vaadin.server.VaadinSession; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.Button.ClickListener; diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket1589.java b/uitest/src/com/vaadin/tests/tickets/Ticket1589.java index 2facf44268..62ceceeefb 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket1589.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket1589.java @@ -14,9 +14,9 @@ import com.vaadin.LegacyApplication; import com.vaadin.server.DownloadStream; import com.vaadin.server.ExternalResource; import com.vaadin.server.RequestHandler; -import com.vaadin.server.VaadinSession; import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinResponse; +import com.vaadin.server.VaadinSession; import com.vaadin.ui.Link; import com.vaadin.ui.UI.LegacyWindow; @@ -52,9 +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.getRequestPathInfo(); // 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 f18406ede3..976bebd7cb 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket1921.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket1921.java @@ -5,9 +5,9 @@ import java.util.Map; import com.vaadin.LegacyApplication; import com.vaadin.server.RequestHandler; -import com.vaadin.server.VaadinSession; import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinResponse; +import com.vaadin.server.VaadinSession; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.Label; @@ -94,9 +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) { diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket2181.java b/uitest/src/com/vaadin/tests/tickets/Ticket2181.java index 6b8b40abc1..ae758884b1 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket2181.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket2181.java @@ -16,7 +16,8 @@ import com.vaadin.ui.TextField; import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.VerticalLayout; -public class Ticket2181 extends LegacyApplication implements Button.ClickListener { +public class Ticket2181 extends LegacyApplication implements + Button.ClickListener { // private static final Object PROPERTY_VALUE = new Object(); // private static final Object PROPERTY_CAPTION = new Object(); diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket2242.java b/uitest/src/com/vaadin/tests/tickets/Ticket2242.java index 408d7ae789..0b9185c379 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket2242.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket2242.java @@ -13,7 +13,8 @@ import com.vaadin.ui.Button.ClickListener; import com.vaadin.ui.Table; import com.vaadin.ui.UI.LegacyWindow; -public class Ticket2242 extends LegacyApplication implements ValueChangeListener { +public class Ticket2242 extends LegacyApplication implements + ValueChangeListener { private Object tableValue = null; private Table t; diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket2292.java b/uitest/src/com/vaadin/tests/tickets/Ticket2292.java index e67e83b501..20047df2ee 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket2292.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket2292.java @@ -12,9 +12,9 @@ import javax.imageio.ImageIO; import com.vaadin.server.DownloadStream; import com.vaadin.server.ExternalResource; import com.vaadin.server.RequestHandler; -import com.vaadin.server.VaadinSession; import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinResponse; +import com.vaadin.server.VaadinSession; import com.vaadin.ui.Button; import com.vaadin.ui.CheckBox; import com.vaadin.ui.Label; @@ -48,9 +48,8 @@ public class Ticket2292 extends com.vaadin.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.getRequestPathInfo(); if (!relativeUri.contains("icon.png")) { |