diff options
author | Per-Åke Minborg <minborg@speedment.com> | 2016-10-28 08:32:15 -0700 |
---|---|---|
committer | Pekka Hyvönen <pekka@vaadin.com> | 2016-11-02 15:07:05 +0000 |
commit | 9bef3d136c63d3eded2dec1ffdb0af6b69b9c011 (patch) | |
tree | 351ea19c9ea341737011488ce789b03a2a438c39 /server/src | |
parent | 73078c7560d40db80dae6a6fb8047c29a92dd8d0 (diff) | |
download | vaadin-framework-9bef3d136c63d3eded2dec1ffdb0af6b69b9c011.tar.gz vaadin-framework-9bef3d136c63d3eded2dec1ffdb0af6b69b9c011.zip |
Remove Boolean constructor invocation and add foreach
Change-Id: I80b73b653e97904605dc62484a7448f3bfbf7219
Diffstat (limited to 'server/src')
4 files changed, 6 insertions, 6 deletions
diff --git a/server/src/main/java/com/vaadin/server/CompositeErrorMessage.java b/server/src/main/java/com/vaadin/server/CompositeErrorMessage.java index 429694a04f..6e37a94c5e 100644 --- a/server/src/main/java/com/vaadin/server/CompositeErrorMessage.java +++ b/server/src/main/java/com/vaadin/server/CompositeErrorMessage.java @@ -39,8 +39,8 @@ public class CompositeErrorMessage extends AbstractErrorMessage { super(null); setErrorLevel(ErrorLevel.INFORMATION); - for (int i = 0; i < errorMessages.length; i++) { - addErrorMessage(errorMessages[i]); + for (ErrorMessage errorMessage : errorMessages) { + addErrorMessage(errorMessage); } if (getCauses().size() == 0) { diff --git a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java index c86b139520..521a131c4c 100644 --- a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java +++ b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java @@ -218,7 +218,7 @@ public class ColorPickerPopup extends Window implements HasValue<Color> { // Add the resize button for the history resize.addClickListener(this::resizeButtonClick); - resize.setData(new Boolean(false)); + resize.setData(false); resize.setWidth("100%"); resize.setHeight("10px"); resize.setPrimaryStyleName("resize-button"); @@ -437,7 +437,7 @@ public class ColorPickerPopup extends Window implements HasValue<Color> { history.setHeight("85px"); } - resize.setData(new Boolean(!minimize)); + resize.setData(!minimize); } private void okButtonClick(ClickEvent event) { diff --git a/server/src/test/java/com/vaadin/util/ReflectToolsGetFieldValueByTypeTest.java b/server/src/test/java/com/vaadin/util/ReflectToolsGetFieldValueByTypeTest.java index 7d15bcfc68..8972bbb66f 100644 --- a/server/src/test/java/com/vaadin/util/ReflectToolsGetFieldValueByTypeTest.java +++ b/server/src/test/java/com/vaadin/util/ReflectToolsGetFieldValueByTypeTest.java @@ -24,7 +24,7 @@ public class ReflectToolsGetFieldValueByTypeTest { MySubClass myInstance = new MySubClass(); java.lang.reflect.Field memberField; - Object fieldValue = new Boolean(false); + Object fieldValue = false; try { memberField = myInstance.getClass().getField("field"); // Should get a String value. Without the third parameter (calling diff --git a/server/src/test/java/com/vaadin/util/ReflectToolsGetPrimitiveFieldValueTest.java b/server/src/test/java/com/vaadin/util/ReflectToolsGetPrimitiveFieldValueTest.java index d6362395da..167ab774f2 100644 --- a/server/src/test/java/com/vaadin/util/ReflectToolsGetPrimitiveFieldValueTest.java +++ b/server/src/test/java/com/vaadin/util/ReflectToolsGetPrimitiveFieldValueTest.java @@ -14,7 +14,7 @@ public class ReflectToolsGetPrimitiveFieldValueTest { MyClass myInstance = new MyClass(); java.lang.reflect.Field memberField; - Object fieldValue = new Boolean(false); + Object fieldValue = false; try { memberField = myInstance.getClass().getField("field"); fieldValue = ReflectTools.getJavaFieldValue(myInstance, |