diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-07-23 15:23:43 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-07-23 15:23:43 +0300 |
commit | 3604bf01ded16d21041cbb655632429e00c94639 (patch) | |
tree | 9bf7ae9d3a33e6b672c164e696a24aef08ebc13e /tests/server-side/com | |
parent | b7982bac6d8bca02fc76c9974ffd1c24d9a06f04 (diff) | |
download | vaadin-framework-3604bf01ded16d21041cbb655632429e00c94639.tar.gz vaadin-framework-3604bf01ded16d21041cbb655632429e00c94639.zip |
Add Java 6 @Override annotations to all methods from interfaces
Diffstat (limited to 'tests/server-side/com')
25 files changed, 105 insertions, 0 deletions
diff --git a/tests/server-side/com/vaadin/data/util/AbstractContainerTest.java b/tests/server-side/com/vaadin/data/util/AbstractContainerTest.java index 6cbe675fa1..d703fb0364 100644 --- a/tests/server-side/com/vaadin/data/util/AbstractContainerTest.java +++ b/tests/server-side/com/vaadin/data/util/AbstractContainerTest.java @@ -62,6 +62,7 @@ public abstract class AbstractContainerTest extends TestCase { protected static class ItemSetChangeCounter extends AbstractEventCounter implements ItemSetChangeListener { + @Override public void containerItemSetChange(ItemSetChangeEvent event) { increment(); } diff --git a/tests/server-side/com/vaadin/data/util/BeanContainerTest.java b/tests/server-side/com/vaadin/data/util/BeanContainerTest.java index d9fa8d896e..9037e303a8 100644 --- a/tests/server-side/com/vaadin/data/util/BeanContainerTest.java +++ b/tests/server-side/com/vaadin/data/util/BeanContainerTest.java @@ -18,6 +18,7 @@ public class BeanContainerTest extends AbstractBeanContainerTest { protected static class PersonNameResolver implements BeanIdResolver<String, Person> { + @Override public String getIdForBean(Person bean) { return bean != null ? bean.getName() : null; } @@ -27,6 +28,7 @@ public class BeanContainerTest extends AbstractBeanContainerTest { protected static class NullResolver implements BeanIdResolver<String, Person> { + @Override public String getIdForBean(Person bean) { return null; } @@ -332,6 +334,7 @@ public class BeanContainerTest extends AbstractBeanContainerTest { container .setBeanIdResolver(new BeanIdResolver<String, AbstractBeanContainerTest.Person>() { + @Override public String getIdForBean(Person bean) { return bean.getName(); } diff --git a/tests/server-side/com/vaadin/data/util/BeanItemTest.java b/tests/server-side/com/vaadin/data/util/BeanItemTest.java index 51e11260f5..e1ad75796c 100644 --- a/tests/server-side/com/vaadin/data/util/BeanItemTest.java +++ b/tests/server-side/com/vaadin/data/util/BeanItemTest.java @@ -127,6 +127,7 @@ public class BeanItemTest extends TestCase { public void setSub(int i); + @Override public int getOverride(); public void setOverride(int i); diff --git a/tests/server-side/com/vaadin/data/util/TestContainerSorting.java b/tests/server-side/com/vaadin/data/util/TestContainerSorting.java index 9e69b94fbb..497699605a 100644 --- a/tests/server-side/com/vaadin/data/util/TestContainerSorting.java +++ b/tests/server-side/com/vaadin/data/util/TestContainerSorting.java @@ -205,6 +205,7 @@ public class TestContainerSorting extends TestCase { public class MyObject implements Comparable<MyObject> { private String data; + @Override public int compareTo(MyObject o) { if (o == null) { return 1; diff --git a/tests/server-side/com/vaadin/data/util/TestHierarchicalContainer.java b/tests/server-side/com/vaadin/data/util/TestHierarchicalContainer.java index 60894dbe6f..9e0558a122 100644 --- a/tests/server-side/com/vaadin/data/util/TestHierarchicalContainer.java +++ b/tests/server-side/com/vaadin/data/util/TestHierarchicalContainer.java @@ -176,11 +176,13 @@ public class TestHierarchicalContainer extends // Dummy filter that does not remove any items c.addContainerFilter(new Filter() { + @Override public boolean passesFilter(Object itemId, Item item) throws UnsupportedOperationException { return true; } + @Override public boolean appliesToProperty(Object propertyId) { return true; } diff --git a/tests/server-side/com/vaadin/data/util/filter/AbstractFilterTest.java b/tests/server-side/com/vaadin/data/util/filter/AbstractFilterTest.java index efc31f0bd4..6f96c3a51a 100644 --- a/tests/server-side/com/vaadin/data/util/filter/AbstractFilterTest.java +++ b/tests/server-side/com/vaadin/data/util/filter/AbstractFilterTest.java @@ -24,22 +24,27 @@ public abstract class AbstractFilterTest<FILTERTYPE extends Filter> extends protected static class NullProperty implements Property<String> { + @Override public String getValue() { return null; } + @Override public void setValue(Object newValue) throws ReadOnlyException { throw new ReadOnlyException(); } + @Override public Class<String> getType() { return String.class; } + @Override public boolean isReadOnly() { return true; } + @Override public void setReadOnly(boolean newStatus) { // do nothing } @@ -60,11 +65,13 @@ public abstract class AbstractFilterTest<FILTERTYPE extends Filter> extends this.propertyId = propertyId; } + @Override public boolean passesFilter(Object itemId, Item item) throws UnsupportedOperationException { return this.item == item; } + @Override public boolean appliesToProperty(Object propertyId) { return this.propertyId != null ? this.propertyId.equals(propertyId) : true; diff --git a/tests/server-side/com/vaadin/data/util/sqlcontainer/SQLContainerTest.java b/tests/server-side/com/vaadin/data/util/sqlcontainer/SQLContainerTest.java index c273bbf590..6649bc16e8 100644 --- a/tests/server-side/com/vaadin/data/util/sqlcontainer/SQLContainerTest.java +++ b/tests/server-side/com/vaadin/data/util/sqlcontainer/SQLContainerTest.java @@ -323,6 +323,7 @@ public class SQLContainerTest { EasyMock.expect( delegate.getQueryString(EasyMock.anyInt(), EasyMock.anyInt())) .andAnswer(new IAnswer<String>() { + @Override public String answer() throws Throwable { Object[] args = EasyMock.getCurrentArguments(); int offset = (Integer) (args[0]); @@ -1132,6 +1133,7 @@ public class SQLContainerTest { delegate.storeRow(EasyMock.isA(Connection.class), EasyMock.isA(RowItem.class))) .andAnswer(new IAnswer<Integer>() { + @Override public Integer answer() throws Throwable { Connection conn = (Connection) EasyMock .getCurrentArguments()[0]; @@ -1163,6 +1165,7 @@ public class SQLContainerTest { EasyMock.expect( delegate.getQueryString(EasyMock.anyInt(), EasyMock.anyInt())) .andAnswer(new IAnswer<String>() { + @Override public String answer() throws Throwable { Object[] args = EasyMock.getCurrentArguments(); int offset = (Integer) (args[0]); @@ -1231,6 +1234,7 @@ public class SQLContainerTest { delegate.storeRow(EasyMock.isA(Connection.class), EasyMock.isA(RowItem.class))) .andAnswer(new IAnswer<Integer>() { + @Override public Integer answer() throws Throwable { Connection conn = (Connection) EasyMock .getCurrentArguments()[0]; @@ -1262,6 +1266,7 @@ public class SQLContainerTest { EasyMock.expect( delegate.getQueryString(EasyMock.anyInt(), EasyMock.anyInt())) .andAnswer(new IAnswer<String>() { + @Override public String answer() throws Throwable { Object[] args = EasyMock.getCurrentArguments(); int offset = (Integer) (args[0]); @@ -1337,6 +1342,7 @@ public class SQLContainerTest { delegate.removeRow(EasyMock.isA(Connection.class), EasyMock.isA(RowItem.class))) .andAnswer(new IAnswer<Boolean>() { + @Override public Boolean answer() throws Throwable { Connection conn = (Connection) EasyMock .getCurrentArguments()[0]; @@ -1352,6 +1358,7 @@ public class SQLContainerTest { EasyMock.expect( delegate.getQueryString(EasyMock.anyInt(), EasyMock.anyInt())) .andAnswer(new IAnswer<String>() { + @Override public String answer() throws Throwable { Object[] args = EasyMock.getCurrentArguments(); int offset = (Integer) (args[0]); @@ -1414,6 +1421,7 @@ public class SQLContainerTest { delegate.storeRow(EasyMock.isA(Connection.class), EasyMock.isA(RowItem.class))) .andAnswer(new IAnswer<Integer>() { + @Override public Integer answer() throws Throwable { Connection conn = (Connection) EasyMock .getCurrentArguments()[0]; @@ -1432,6 +1440,7 @@ public class SQLContainerTest { EasyMock.expect( delegate.getQueryString(EasyMock.anyInt(), EasyMock.anyInt())) .andAnswer(new IAnswer<String>() { + @Override public String answer() throws Throwable { Object[] args = EasyMock.getCurrentArguments(); int offset = (Integer) (args[0]); @@ -1644,6 +1653,7 @@ public class SQLContainerTest { EasyMock.expectLastCall().anyTimes(); delegate.setOrderBy(EasyMock.isA(List.class)); EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() { + @Override public Object answer() throws Throwable { List<OrderBy> orders = (List<OrderBy>) EasyMock .getCurrentArguments()[0]; @@ -1655,6 +1665,7 @@ public class SQLContainerTest { EasyMock.expect( delegate.getQueryString(EasyMock.anyInt(), EasyMock.anyInt())) .andAnswer(new IAnswer<String>() { + @Override public String answer() throws Throwable { Object[] args = EasyMock.getCurrentArguments(); int offset = (Integer) (args[0]); @@ -1756,6 +1767,7 @@ public class SQLContainerTest { EasyMock.expectLastCall().anyTimes(); delegate.setOrderBy(EasyMock.isA(List.class)); EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() { + @Override public Object answer() throws Throwable { List<OrderBy> orders = (List<OrderBy>) EasyMock .getCurrentArguments()[0]; @@ -1767,6 +1779,7 @@ public class SQLContainerTest { EasyMock.expect( delegate.getQueryString(EasyMock.anyInt(), EasyMock.anyInt())) .andAnswer(new IAnswer<String>() { + @Override public String answer() throws Throwable { Object[] args = EasyMock.getCurrentArguments(); int offset = (Integer) (args[0]); @@ -1861,6 +1874,7 @@ public class SQLContainerTest { EasyMock.expectLastCall().anyTimes(); delegate.setFilters(EasyMock.isA(List.class)); EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() { + @Override public Object answer() throws Throwable { List<Filter> orders = (List<Filter>) EasyMock .getCurrentArguments()[0]; @@ -1872,6 +1886,7 @@ public class SQLContainerTest { EasyMock.expect( delegate.getQueryStatement(EasyMock.anyInt(), EasyMock.anyInt())) .andAnswer(new IAnswer<StatementHelper>() { + @Override public StatementHelper answer() throws Throwable { Object[] args = EasyMock.getCurrentArguments(); int offset = (Integer) (args[0]); @@ -1882,6 +1897,7 @@ public class SQLContainerTest { }).anyTimes(); EasyMock.expect(delegate.getCountStatement()) .andAnswer(new IAnswer<StatementHelper>() { + @Override @SuppressWarnings("deprecation") public StatementHelper answer() throws Throwable { StatementHelper sh = new StatementHelper(); @@ -1931,6 +1947,7 @@ public class SQLContainerTest { EasyMock.expectLastCall().anyTimes(); delegate.setFilters(EasyMock.isA(List.class)); EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() { + @Override public Object answer() throws Throwable { List<Filter> orders = (List<Filter>) EasyMock .getCurrentArguments()[0]; @@ -1942,6 +1959,7 @@ public class SQLContainerTest { EasyMock.expect( delegate.getQueryStatement(EasyMock.anyInt(), EasyMock.anyInt())) .andAnswer(new IAnswer<StatementHelper>() { + @Override public StatementHelper answer() throws Throwable { Object[] args = EasyMock.getCurrentArguments(); int offset = (Integer) (args[0]); @@ -1952,6 +1970,7 @@ public class SQLContainerTest { }).anyTimes(); EasyMock.expect(delegate.getCountStatement()) .andAnswer(new IAnswer<StatementHelper>() { + @Override @SuppressWarnings("deprecation") public StatementHelper answer() throws Throwable { StatementHelper sh = new StatementHelper(); @@ -2000,6 +2019,7 @@ public class SQLContainerTest { EasyMock.expectLastCall().anyTimes(); delegate.setFilters(EasyMock.isA(List.class)); EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() { + @Override public Object answer() throws Throwable { List<Filter> orders = (List<Filter>) EasyMock .getCurrentArguments()[0]; @@ -2011,6 +2031,7 @@ public class SQLContainerTest { EasyMock.expect( delegate.getQueryStatement(EasyMock.anyInt(), EasyMock.anyInt())) .andAnswer(new IAnswer<StatementHelper>() { + @Override public StatementHelper answer() throws Throwable { Object[] args = EasyMock.getCurrentArguments(); int offset = (Integer) (args[0]); @@ -2021,6 +2042,7 @@ public class SQLContainerTest { }).anyTimes(); EasyMock.expect(delegate.getCountStatement()) .andAnswer(new IAnswer<StatementHelper>() { + @Override public StatementHelper answer() throws Throwable { StatementHelper sh = new StatementHelper(); StringBuffer query = new StringBuffer( @@ -2069,6 +2091,7 @@ public class SQLContainerTest { EasyMock.expectLastCall().anyTimes(); delegate.setFilters(EasyMock.isA(List.class)); EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() { + @Override public Object answer() throws Throwable { List<Filter> orders = (List<Filter>) EasyMock .getCurrentArguments()[0]; @@ -2080,6 +2103,7 @@ public class SQLContainerTest { EasyMock.expect( delegate.getQueryStatement(EasyMock.anyInt(), EasyMock.anyInt())) .andAnswer(new IAnswer<StatementHelper>() { + @Override public StatementHelper answer() throws Throwable { Object[] args = EasyMock.getCurrentArguments(); int offset = (Integer) (args[0]); @@ -2090,6 +2114,7 @@ public class SQLContainerTest { }).anyTimes(); EasyMock.expect(delegate.getCountStatement()) .andAnswer(new IAnswer<StatementHelper>() { + @Override @SuppressWarnings("deprecation") public StatementHelper answer() throws Throwable { StatementHelper sh = new StatementHelper(); @@ -2145,6 +2170,7 @@ public class SQLContainerTest { EasyMock.expectLastCall().anyTimes(); delegate.setFilters(EasyMock.isA(List.class)); EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() { + @Override public Object answer() throws Throwable { List<Filter> orders = (List<Filter>) EasyMock .getCurrentArguments()[0]; @@ -2156,6 +2182,7 @@ public class SQLContainerTest { EasyMock.expect( delegate.getQueryStatement(EasyMock.anyInt(), EasyMock.anyInt())) .andAnswer(new IAnswer<StatementHelper>() { + @Override public StatementHelper answer() throws Throwable { Object[] args = EasyMock.getCurrentArguments(); int offset = (Integer) (args[0]); @@ -2166,6 +2193,7 @@ public class SQLContainerTest { }).anyTimes(); EasyMock.expect(delegate.getCountStatement()) .andAnswer(new IAnswer<StatementHelper>() { + @Override @SuppressWarnings("deprecation") public StatementHelper answer() throws Throwable { StatementHelper sh = new StatementHelper(); @@ -2221,6 +2249,7 @@ public class SQLContainerTest { EasyMock.expectLastCall().anyTimes(); delegate.setFilters(EasyMock.isA(List.class)); EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() { + @Override public Object answer() throws Throwable { List<Filter> orders = (List<Filter>) EasyMock .getCurrentArguments()[0]; @@ -2232,6 +2261,7 @@ public class SQLContainerTest { EasyMock.expect( delegate.getQueryStatement(EasyMock.anyInt(), EasyMock.anyInt())) .andAnswer(new IAnswer<StatementHelper>() { + @Override public StatementHelper answer() throws Throwable { Object[] args = EasyMock.getCurrentArguments(); int offset = (Integer) (args[0]); @@ -2242,6 +2272,7 @@ public class SQLContainerTest { }).anyTimes(); EasyMock.expect(delegate.getCountStatement()) .andAnswer(new IAnswer<StatementHelper>() { + @Override @SuppressWarnings("deprecation") public StatementHelper answer() throws Throwable { StatementHelper sh = new StatementHelper(); @@ -2323,6 +2354,7 @@ public class SQLContainerTest { EasyMock.expectLastCall().anyTimes(); delegate.setOrderBy(EasyMock.isA(List.class)); EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() { + @Override public Object answer() throws Throwable { List<OrderBy> orders = (List<OrderBy>) EasyMock .getCurrentArguments()[0]; @@ -2334,6 +2366,7 @@ public class SQLContainerTest { EasyMock.expect( delegate.getQueryString(EasyMock.anyInt(), EasyMock.anyInt())) .andAnswer(new IAnswer<String>() { + @Override public String answer() throws Throwable { Object[] args = EasyMock.getCurrentArguments(); int offset = (Integer) (args[0]); diff --git a/tests/server-side/com/vaadin/data/util/sqlcontainer/TicketTests.java b/tests/server-side/com/vaadin/data/util/sqlcontainer/TicketTests.java index 75ab455678..a12786f13a 100644 --- a/tests/server-side/com/vaadin/data/util/sqlcontainer/TicketTests.java +++ b/tests/server-side/com/vaadin/data/util/sqlcontainer/TicketTests.java @@ -64,6 +64,7 @@ public class TicketTests { EasyMock.expectLastCall().anyTimes(); delegate.setFilters(EasyMock.isA(List.class)); EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() { + @Override public Object answer() throws Throwable { List<Filter> orders = (List<Filter>) EasyMock .getCurrentArguments()[0]; @@ -75,6 +76,7 @@ public class TicketTests { EasyMock.expect( delegate.getQueryStatement(EasyMock.anyInt(), EasyMock.anyInt())) .andAnswer(new IAnswer<StatementHelper>() { + @Override public StatementHelper answer() throws Throwable { Object[] args = EasyMock.getCurrentArguments(); int offset = (Integer) (args[0]); @@ -85,6 +87,7 @@ public class TicketTests { }).anyTimes(); EasyMock.expect(delegate.getCountStatement()) .andAnswer(new IAnswer<StatementHelper>() { + @Override @SuppressWarnings("deprecation") public StatementHelper answer() throws Throwable { StatementHelper sh = new StatementHelper(); diff --git a/tests/server-side/com/vaadin/data/util/sqlcontainer/connection/MockInitialContextFactory.java b/tests/server-side/com/vaadin/data/util/sqlcontainer/connection/MockInitialContextFactory.java index 3ee260245a..324899e373 100644 --- a/tests/server-side/com/vaadin/data/util/sqlcontainer/connection/MockInitialContextFactory.java +++ b/tests/server-side/com/vaadin/data/util/sqlcontainer/connection/MockInitialContextFactory.java @@ -22,6 +22,7 @@ public class MockInitialContextFactory implements InitialContextFactory { mockCtx = ctx; } + @Override public Context getInitialContext(java.util.Hashtable<?, ?> environment) throws NamingException { if (mockCtx == null) { diff --git a/tests/server-side/com/vaadin/terminal/gwt/server/TestAbstractApplicationServletStaticFilesLocation.java b/tests/server-side/com/vaadin/terminal/gwt/server/TestAbstractApplicationServletStaticFilesLocation.java index 7e45ea50d7..38fca09157 100644 --- a/tests/server-side/com/vaadin/terminal/gwt/server/TestAbstractApplicationServletStaticFilesLocation.java +++ b/tests/server-side/com/vaadin/terminal/gwt/server/TestAbstractApplicationServletStaticFilesLocation.java @@ -46,29 +46,35 @@ public class TestAbstractApplicationServletStaticFilesLocation extends TestCase public class DummyServletConfig implements ServletConfig { // public DummyServletConfig(Map<String,String> initParameters, ) + @Override public String getInitParameter(String name) { // TODO Auto-generated method stub return null; } + @Override public Enumeration<Object> getInitParameterNames() { return new Enumeration<Object>() { + @Override public boolean hasMoreElements() { return false; } + @Override public Object nextElement() { return null; } }; } + @Override public ServletContext getServletContext() { // TODO Auto-generated method stub return null; } + @Override public String getServletName() { // TODO Auto-generated method stub return null; diff --git a/tests/server-side/com/vaadin/tests/VaadinClasses.java b/tests/server-side/com/vaadin/tests/VaadinClasses.java index 0ee193e8f1..2f937bf58d 100644 --- a/tests/server-side/com/vaadin/tests/VaadinClasses.java +++ b/tests/server-side/com/vaadin/tests/VaadinClasses.java @@ -164,6 +164,7 @@ public class VaadinClasses { Collections.sort(classes, new Comparator<Class<? extends T>>() { + @Override public int compare(Class<? extends T> o1, Class<? extends T> o2) { return o1.getName().compareTo(o2.getName()); } diff --git a/tests/server-side/com/vaadin/tests/data/converter/ConverterFactory.java b/tests/server-side/com/vaadin/tests/data/converter/ConverterFactory.java index 4bd9cf0cf7..19a470d816 100644 --- a/tests/server-side/com/vaadin/tests/data/converter/ConverterFactory.java +++ b/tests/server-side/com/vaadin/tests/data/converter/ConverterFactory.java @@ -16,20 +16,24 @@ public class ConverterFactory extends TestCase { public static class ConvertTo42 implements Converter<String, Integer> { + @Override public Integer convertToModel(String value, Locale locale) throws com.vaadin.data.util.converter.Converter.ConversionException { return 42; } + @Override public String convertToPresentation(Integer value, Locale locale) throws com.vaadin.data.util.converter.Converter.ConversionException { return "42"; } + @Override public Class<Integer> getModelType() { return Integer.class; } + @Override public Class<String> getPresentationType() { return String.class; } diff --git a/tests/server-side/com/vaadin/tests/server/SourceFileChecker.java b/tests/server-side/com/vaadin/tests/server/SourceFileChecker.java index 9906990165..f02e5d2932 100644 --- a/tests/server-side/com/vaadin/tests/server/SourceFileChecker.java +++ b/tests/server-side/com/vaadin/tests/server/SourceFileChecker.java @@ -148,6 +148,7 @@ public class SourceFileChecker extends TestCase { } abstract class FileContentsValidator implements FileValidator { + @Override public void validateFile(File f) throws Exception { FileInputStream fis = new FileInputStream(f); String contents = IOUtils.toString(fis); diff --git a/tests/server-side/com/vaadin/tests/server/TestEventRouter.java b/tests/server-side/com/vaadin/tests/server/TestEventRouter.java index dc388a66ac..a8f5039042 100644 --- a/tests/server-side/com/vaadin/tests/server/TestEventRouter.java +++ b/tests/server-side/com/vaadin/tests/server/TestEventRouter.java @@ -15,9 +15,11 @@ public class TestEventRouter extends TestCase { final ValueChangeListener outer = new ValueChangeListener() { + @Override public void valueChange(ValueChangeEvent event) { ValueChangeListener inner = new ValueChangeListener() { + @Override public void valueChange(ValueChangeEvent event) { innerListenerCalls++; System.out.println("The inner listener was called"); diff --git a/tests/server-side/com/vaadin/tests/server/TransactionListenersConcurrency.java b/tests/server-side/com/vaadin/tests/server/TransactionListenersConcurrency.java index 8cc26a5c7f..b567617fdd 100644 --- a/tests/server-side/com/vaadin/tests/server/TransactionListenersConcurrency.java +++ b/tests/server-side/com/vaadin/tests/server/TransactionListenersConcurrency.java @@ -46,6 +46,7 @@ public class TransactionListenersConcurrency extends TestCase { for (int i = 0; i < 5; i++) { Thread t = new Thread(new Runnable() { + @Override public void run() { Application app = new Application() { @@ -98,6 +99,7 @@ public class TransactionListenersConcurrency extends TestCase { threads.add(t); t.setUncaughtExceptionHandler(new UncaughtExceptionHandler() { + @Override public void uncaughtException(Thread t, Throwable e) { e = e.getCause(); exceptions.add(e); @@ -163,6 +165,7 @@ public class TransactionListenersConcurrency extends TestCase { this.delay = delay; } + @Override public void transactionStart(Application application, Object transactionData) { try { @@ -173,6 +176,7 @@ public class TransactionListenersConcurrency extends TestCase { } + @Override public void transactionEnd(Application application, Object transactionData) { try { diff --git a/tests/server-side/com/vaadin/tests/server/component/abstractfield/AbstractFieldValueConversions.java b/tests/server-side/com/vaadin/tests/server/component/abstractfield/AbstractFieldValueConversions.java index 446228583a..57af748247 100644 --- a/tests/server-side/com/vaadin/tests/server/component/abstractfield/AbstractFieldValueConversions.java +++ b/tests/server-side/com/vaadin/tests/server/component/abstractfield/AbstractFieldValueConversions.java @@ -37,18 +37,22 @@ public class AbstractFieldValueConversions extends TestCase { TextField tf = new TextField(); tf.setConverter(new Converter<String, String>() { + @Override public String convertToModel(String value, Locale locale) { return value; } + @Override public String convertToPresentation(String value, Locale locale) { return value; } + @Override public Class<String> getModelType() { return String.class; } + @Override public Class<String> getPresentationType() { return String.class; } @@ -67,19 +71,23 @@ public class AbstractFieldValueConversions extends TestCase { TextField tf = new TextField(); tf.setConverter(new Converter<String, Integer>() { + @Override public Integer convertToModel(String value, Locale locale) { throw new ConversionException("Failed"); } + @Override public String convertToPresentation(Integer value, Locale locale) { throw new ConversionException("Failed"); } + @Override public Class<Integer> getModelType() { // TODO Auto-generated method stub return null; } + @Override public Class<String> getPresentationType() { // TODO Auto-generated method stub return null; @@ -112,6 +120,7 @@ public class AbstractFieldValueConversions extends TestCase { CheckBox cb = new CheckBox(); cb.setConverter(new Converter<Boolean, Boolean>() { + @Override public Boolean convertToModel(Boolean value, Locale locale) { // value from a CheckBox should never be null as long as it is // not set to null (handled by conversion below). @@ -119,6 +128,7 @@ public class AbstractFieldValueConversions extends TestCase { return value; } + @Override public Boolean convertToPresentation(Boolean value, Locale locale) { // Datamodel -> field if (value == null) { @@ -128,10 +138,12 @@ public class AbstractFieldValueConversions extends TestCase { return value; } + @Override public Class<Boolean> getModelType() { return Boolean.class; } + @Override public Class<Boolean> getPresentationType() { return Boolean.class; } diff --git a/tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java b/tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java index 94385700d8..f66f523770 100644 --- a/tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java +++ b/tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java @@ -60,15 +60,18 @@ public class RemoveListenersOnDetach { }; Property property = new AbstractProperty() { + @Override public Object getValue() { return null; } + @Override public void setValue(Object newValue) throws ReadOnlyException, ConversionException { fireValueChange(); } + @Override public Class<?> getType() { return String.class; } diff --git a/tests/server-side/com/vaadin/tests/server/component/button/ButtonClick.java b/tests/server-side/com/vaadin/tests/server/component/button/ButtonClick.java index 464d131996..4fe499a0a0 100644 --- a/tests/server-side/com/vaadin/tests/server/component/button/ButtonClick.java +++ b/tests/server-side/com/vaadin/tests/server/component/button/ButtonClick.java @@ -38,6 +38,7 @@ public class ButtonClick { private Button getButton() { Button b = new Button(); b.addListener(new Button.ClickListener() { + @Override public void buttonClick(ClickEvent ev) { clicked = true; } diff --git a/tests/server-side/com/vaadin/tests/server/component/menubar/MenuBarIds.java b/tests/server-side/com/vaadin/tests/server/component/menubar/MenuBarIds.java index a0dadf8cc6..f304315ebc 100644 --- a/tests/server-side/com/vaadin/tests/server/component/menubar/MenuBarIds.java +++ b/tests/server-side/com/vaadin/tests/server/component/menubar/MenuBarIds.java @@ -87,6 +87,7 @@ public class MenuBarIds extends TestCase implements Command { } } + @Override public void menuSelected(MenuItem selectedItem) { assertNull("lastSelectedItem was not cleared before selecting an item", lastSelectedItem); diff --git a/tests/server-side/com/vaadin/tests/server/component/textfield/TextFieldWithPropertyFormatter.java b/tests/server-side/com/vaadin/tests/server/component/textfield/TextFieldWithPropertyFormatter.java index c6af98a873..bd6dd6c7b1 100644 --- a/tests/server-side/com/vaadin/tests/server/component/textfield/TextFieldWithPropertyFormatter.java +++ b/tests/server-side/com/vaadin/tests/server/component/textfield/TextFieldWithPropertyFormatter.java @@ -57,6 +57,7 @@ public class TextFieldWithPropertyFormatter extends TestCase { listener = new Property.ValueChangeListener() { + @Override public void valueChange(ValueChangeEvent event) { listenerCalled++; assertEquals(1, listenerCalled); diff --git a/tests/server-side/com/vaadin/tests/server/component/tree/TestListeners.java b/tests/server-side/com/vaadin/tests/server/component/tree/TestListeners.java index 49610ff293..4984cf161b 100644 --- a/tests/server-side/com/vaadin/tests/server/component/tree/TestListeners.java +++ b/tests/server-side/com/vaadin/tests/server/component/tree/TestListeners.java @@ -121,12 +121,14 @@ public class TestListeners extends TestCase implements ExpandListener, assertEquals(0, collapseCalled); } + @Override public void nodeExpand(ExpandEvent event) { lastExpanded = event.getItemId(); expandCalled++; } + @Override public void nodeCollapse(CollapseEvent event) { lastCollapsed = event.getItemId(); collapseCalled++; diff --git a/tests/server-side/com/vaadin/tests/server/component/window/AttachDetachWindow.java b/tests/server-side/com/vaadin/tests/server/component/window/AttachDetachWindow.java index 7423ba8669..e1435ea2ab 100644 --- a/tests/server-side/com/vaadin/tests/server/component/window/AttachDetachWindow.java +++ b/tests/server-side/com/vaadin/tests/server/component/window/AttachDetachWindow.java @@ -47,14 +47,17 @@ public class AttachDetachWindow { windowDetachCalled = true; } + @Override public boolean attachCalled() { return windowAttachCalled; } + @Override public boolean detachCalled() { return windowDetachCalled; } + @Override public TestContent getTestContent() { return testContent; } @@ -111,14 +114,17 @@ public class AttachDetachWindow { // Do nothing } + @Override public boolean attachCalled() { return rootAttachCalled; } + @Override public boolean detachCalled() { return rootDetachCalled; } + @Override public TestContent getTestContent() { return testContent; } diff --git a/tests/server-side/com/vaadin/tests/server/components/ComponentAttachDetachListenerTest.java b/tests/server-side/com/vaadin/tests/server/components/ComponentAttachDetachListenerTest.java index 1e01d9a55f..3ba1c4c7f1 100644 --- a/tests/server-side/com/vaadin/tests/server/components/ComponentAttachDetachListenerTest.java +++ b/tests/server-side/com/vaadin/tests/server/components/ComponentAttachDetachListenerTest.java @@ -46,6 +46,7 @@ public class ComponentAttachDetachListenerTest extends TestCase { private ComponentPosition componentPosition = null; private class MyAttachListener implements ComponentAttachListener { + @Override public void componentAttachedToContainer(ComponentAttachEvent event) { attachCounter++; attachedComponent = event.getAttachedComponent(); @@ -75,6 +76,7 @@ public class ComponentAttachDetachListenerTest extends TestCase { } private class MyDetachListener implements ComponentDetachListener { + @Override public void componentDetachedFromContainer(ComponentDetachEvent event) { detachCounter++; detachedComponent = event.getDetachedComponent(); diff --git a/tests/server-side/com/vaadin/tests/server/navigator/ClassBasedViewProviderTest.java b/tests/server-side/com/vaadin/tests/server/navigator/ClassBasedViewProviderTest.java index fc0d1b60a0..58bc2c4d4c 100644 --- a/tests/server-side/com/vaadin/tests/server/navigator/ClassBasedViewProviderTest.java +++ b/tests/server-side/com/vaadin/tests/server/navigator/ClassBasedViewProviderTest.java @@ -15,6 +15,7 @@ public class ClassBasedViewProviderTest extends TestCase { public static class TestView extends Label implements View { public String parameters = null; + @Override public void navigateTo(String parameters) { this.parameters = parameters; } diff --git a/tests/server-side/com/vaadin/tests/server/navigator/NavigatorTest.java b/tests/server-side/com/vaadin/tests/server/navigator/NavigatorTest.java index a7eb2e12fd..0507db6700 100644 --- a/tests/server-side/com/vaadin/tests/server/navigator/NavigatorTest.java +++ b/tests/server-side/com/vaadin/tests/server/navigator/NavigatorTest.java @@ -27,16 +27,19 @@ public class NavigatorTest extends TestCase { // TODO test listeners blocking navigation, multiple listeners public static class NullDisplay implements ViewDisplay { + @Override public void showView(View view) { // do nothing } } public static class NullFragmentManager implements FragmentManager { + @Override public String getFragment() { return null; } + @Override public void setFragment(String fragment) { // do nothing } @@ -45,6 +48,7 @@ public class NavigatorTest extends TestCase { public static class TestDisplay implements ViewDisplay { private View currentView; + @Override public void showView(View view) { currentView = view; } @@ -118,6 +122,7 @@ public class NavigatorTest extends TestCase { } } + @Override public boolean isViewChangeAllowed(ViewChangeEvent event) { if (referenceEvents.isEmpty()) { fail("Unexpected call to isViewChangeAllowed()"); @@ -136,6 +141,7 @@ public class NavigatorTest extends TestCase { return returnValue; } + @Override public void navigatorViewChanged(ViewChangeEvent event) { if (referenceEvents.isEmpty()) { fail("Unexpected call to navigatorViewChanged()"); |