diff options
author | Per-Åke Minborg <minborg@speedment.com> | 2016-10-28 21:57:58 -0700 |
---|---|---|
committer | Henri Sara <hesara@vaadin.com> | 2016-11-05 03:16:14 +0000 |
commit | d75191c0e3c601ca87ce7d1d9e09329bce3a8ef2 (patch) | |
tree | 3830315da9841d9c0797eca795862d6bd07b48f5 /server | |
parent | a7f33a05e76e575fe838fba3eeaa1b1e17be5e86 (diff) | |
download | vaadin-framework-d75191c0e3c601ca87ce7d1d9e09329bce3a8ef2.tar.gz vaadin-framework-d75191c0e3c601ca87ce7d1d9e09329bce3a8ef2.zip |
Explicit type args can be inferred
Change-Id: I80b73b653e97904605dc62484a7448f3bfbf7231
Diffstat (limited to 'server')
4 files changed, 13 insertions, 13 deletions
diff --git a/server/src/test/java/com/vaadin/data/BinderConverterValidatorTest.java b/server/src/test/java/com/vaadin/data/BinderConverterValidatorTest.java index 0711ae24bf..ba3804ca8b 100644 --- a/server/src/test/java/com/vaadin/data/BinderConverterValidatorTest.java +++ b/server/src/test/java/com/vaadin/data/BinderConverterValidatorTest.java @@ -356,7 +356,7 @@ public class BinderConverterValidatorTest bindName(); AtomicBoolean beanLevelValidationRun = new AtomicBoolean(); - binder.withValidator(Validator.<Person> from( + binder.withValidator(Validator.from( bean -> beanLevelValidationRun.getAndSet(true), "")); ageField.setValue("not a number"); @@ -373,7 +373,7 @@ public class BinderConverterValidatorTest bindName(); AtomicBoolean beanLevelValidationRun = new AtomicBoolean(); - binder.withValidator(Validator.<Person> from( + binder.withValidator(Validator.from( bean -> beanLevelValidationRun.getAndSet(true), "")); ageField.setValue(String.valueOf(12)); @@ -496,7 +496,7 @@ public class BinderConverterValidatorTest Person::setFirstName); String msg = "foo"; - binder.withValidator(Validator.<Person> from( + binder.withValidator(Validator.from( prsn -> prsn.getAddress() != null || prsn.getEmail() != null, msg)); diff --git a/server/src/test/java/com/vaadin/data/BinderMultiSelectTest.java b/server/src/test/java/com/vaadin/data/BinderMultiSelectTest.java index c4725471da..3b35f86144 100644 --- a/server/src/test/java/com/vaadin/data/BinderMultiSelectTest.java +++ b/server/src/test/java/com/vaadin/data/BinderMultiSelectTest.java @@ -67,8 +67,8 @@ public class BinderMultiSelectTest converterBinder.forField(select) .withConverter(new TestEnumSetToStringConverter()) - .bind(AtomicReference<String>::get, - AtomicReference<String>::set); + .bind(AtomicReference::get, + AtomicReference::set); } @Test diff --git a/server/src/test/java/com/vaadin/data/ResultTest.java b/server/src/test/java/com/vaadin/data/ResultTest.java index 53412907cc..756746a4ff 100644 --- a/server/src/test/java/com/vaadin/data/ResultTest.java +++ b/server/src/test/java/com/vaadin/data/ResultTest.java @@ -57,7 +57,7 @@ public class ResultTest { @Test public void of_exception() { String message = "foo"; - Result<String> result = Result.<String> of(() -> { + Result<String> result = Result.of(() -> { throw new RuntimeException(); }, exception -> message); Assert.assertTrue(result instanceof SimpleResult); diff --git a/server/src/test/java/com/vaadin/tests/event/EventRouterTest.java b/server/src/test/java/com/vaadin/tests/event/EventRouterTest.java index f9b93ccd04..7286b7ea2d 100644 --- a/server/src/test/java/com/vaadin/tests/event/EventRouterTest.java +++ b/server/src/test/java/com/vaadin/tests/event/EventRouterTest.java @@ -55,7 +55,7 @@ public class EventRouterTest { @Test public void fireEvent_noException_eventReceived() { - listener.componentEvent(EasyMock.<Component.Event> anyObject()); + listener.componentEvent(EasyMock.anyObject()); EasyMock.replay(component, listener, errorHandler); router.fireEvent(new Component.Event(component), errorHandler); @@ -64,7 +64,7 @@ public class EventRouterTest { @Test public void fireEvent_exceptionFromListenerAndNoHandler_exceptionPropagated() { - listener.componentEvent(EasyMock.<Component.Event> anyObject()); + listener.componentEvent(EasyMock.anyObject()); EasyMock.expectLastCall() .andThrow(new RuntimeException("listener failed")); @@ -81,10 +81,10 @@ public class EventRouterTest { @Test public void fireEvent_exceptionFromListener_errorHandlerCalled() { - listener.componentEvent(EasyMock.<Component.Event> anyObject()); + listener.componentEvent(EasyMock.anyObject()); EasyMock.expectLastCall() .andThrow(new RuntimeException("listener failed")); - errorHandler.error(EasyMock.<ErrorEvent> anyObject()); + errorHandler.error(EasyMock.anyObject()); EasyMock.replay(component, listener, errorHandler); router.fireEvent(new Component.Event(component), errorHandler); @@ -97,12 +97,12 @@ public class EventRouterTest { router.addListener(Component.Event.class, listener2, COMPONENT_EVENT_METHOD); - listener.componentEvent(EasyMock.<Component.Event> anyObject()); + listener.componentEvent(EasyMock.anyObject()); EasyMock.expectLastCall() .andThrow(new RuntimeException("listener failed")); - errorHandler.error(EasyMock.<ErrorEvent> anyObject()); + errorHandler.error(EasyMock.anyObject()); // second listener should be called despite an error in the first - listener2.componentEvent(EasyMock.<Component.Event> anyObject()); + listener2.componentEvent(EasyMock.anyObject()); EasyMock.replay(component, listener, listener2, errorHandler); router.fireEvent(new Component.Event(component), errorHandler); |