diff options
author | Ahmed Ashour <asashour@yahoo.com> | 2017-09-22 12:23:12 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-09-22 13:23:12 +0300 |
commit | 60ff3d6c3428b2e353ecc0df90296cecc3e840e0 (patch) | |
tree | a88cd5b672417440f57ec786b3c2c3c2bdac6adb /compatibility-server/src/main | |
parent | 23718371f820fb3babca2c57072a62137aa2c01d (diff) | |
download | vaadin-framework-60ff3d6c3428b2e353ecc0df90296cecc3e840e0.tar.gz vaadin-framework-60ff3d6c3428b2e353ecc0df90296cecc3e840e0.zip |
Format curly brackets correctly for checkstyle (#10066)
Diffstat (limited to 'compatibility-server/src/main')
7 files changed, 27 insertions, 49 deletions
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerHierarchicalWrapper.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerHierarchicalWrapper.java index a7b5f737ac..5ad3cee4c7 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerHierarchicalWrapper.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerHierarchicalWrapper.java @@ -150,10 +150,8 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical, parent = new Hashtable<Object, Object>(); children = new Hashtable<Object, LinkedList<Object>>(); roots = new LinkedHashSet<Object>(container.getItemIds()); - } - - // Check that the hierarchy is up-to-date - else { + } else { + // Check that the hierarchy is up-to-date // ensure order of root and child lists is same as in wrapped // container diff --git a/compatibility-server/src/main/java/com/vaadin/v7/server/communication/data/RpcDataProviderExtension.java b/compatibility-server/src/main/java/com/vaadin/v7/server/communication/data/RpcDataProviderExtension.java index 85d3014b0b..5d1b8ffee3 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/server/communication/data/RpcDataProviderExtension.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/server/communication/data/RpcDataProviderExtension.java @@ -236,16 +236,12 @@ public class RpcDataProviderExtension extends AbstractExtension { int firstIndex = addEvent.getFirstIndex(); int count = addEvent.getAddedItemsCount(); insertRowData(firstIndex, count); - } - - else if (event instanceof ItemRemoveEvent) { + } else if (event instanceof ItemRemoveEvent) { ItemRemoveEvent removeEvent = (ItemRemoveEvent) event; int firstIndex = removeEvent.getFirstIndex(); int count = removeEvent.getRemovedItemsCount(); removeRowData(firstIndex, count); - } - - else { + } else { // Remove obsolete value change listeners. Set<Object> keySet = new HashSet<Object>( activeItemHandler.activeItemMap.keySet()); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java index c4e7c42107..caef040d25 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java @@ -3711,9 +3711,7 @@ public class Grid extends AbstractComponent + getRenderer().getPresentationType() + " (in " + toString() + ")"); } - } - - else { + } else { /* * Since the converter is null (i.e. will be removed), we need * to know that the renderer and model are compatible. If not, diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java index ee38b2bcb3..dac43ba923 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java @@ -2928,13 +2928,12 @@ public class Table extends AbstractSelect implements Action.Container, // TODO could be optimized. variables = new HashMap<String, Object>(variables); variables.remove("selected"); - } - - /* - * The AbstractSelect cannot handle the multiselection properly, instead - * we handle it ourself - */ - else if (isSelectable() && isMultiSelect() + } else if ( + /* + * The AbstractSelect cannot handle the multiselection properly, instead + * we handle it ourself + */ + isSelectable() && isMultiSelect() && variables.containsKey("selected") && multiSelectMode == MultiSelectMode.DEFAULT) { handleSelectedItems(variables); @@ -3128,10 +3127,9 @@ public class Table extends AbstractSelect implements Action.Container, fireEvent(new ItemClickEvent(this, item, itemId, propertyId, evt)); } - } - - // Header click event - else if (variables.containsKey("headerClickEvent")) { + } else if ( + // Header click event + variables.containsKey("headerClickEvent")) { MouseEventDetails details = MouseEventDetails .deSerialize((String) variables.get("headerClickEvent")); @@ -3142,10 +3140,9 @@ public class Table extends AbstractSelect implements Action.Container, propertyId = columnIdMap.get(cid.toString()); } fireEvent(new HeaderClickEvent(this, propertyId, details)); - } - - // Footer click event - else if (variables.containsKey("footerClickEvent")) { + } else if ( + // Footer click event + variables.containsKey("footerClickEvent")) { MouseEventDetails details = MouseEventDetails .deSerialize((String) variables.get("footerClickEvent")); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Tree.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Tree.java index ccf4d6e460..0dc1772f65 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Tree.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Tree.java @@ -723,10 +723,8 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, if (!iteratorStack.isEmpty()) { target.endTag("node"); } - } - - // Adds the item on current level - else { + } else { + // Adds the item on current level final Object itemId = i.next(); // Starts the item / node @@ -1309,10 +1307,8 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, // Removes used iterator from the stack iteratorStack.pop(); - } - - // Adds the item on current level - else { + } else { + // Adds the item on current level final Object itemId = i.next(); visible.add(itemId); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerPopup.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerPopup.java index befadf5a77..306c4e78aa 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerPopup.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerPopup.java @@ -479,20 +479,15 @@ public class ColorPickerPopup extends Window } resize.setData(new Boolean(!state)); - } - - // Ok button was clicked - else if (event.getButton() == ok) { + } else if (event.getButton() == ok) { + // Ok button was clicked history.setColor(getColor()); fireColorChanged(); close(); - } - - // Cancel button was clicked - else if (event.getButton() == cancel) { + } else if (event.getButton() == cancel) { + // Cancel button was clicked close(); } - } /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerSelect.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerSelect.java index 57d5a6735f..8e957a59ba 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerSelect.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerSelect.java @@ -128,10 +128,8 @@ public class ColorPickerSelect extends CustomComponent colors[row][col] = new Color( Color.HSVtoRGB(hue, saturation, value)); - } - - // The last row should have the black&white gradient - else { + } else { + // The last row should have the black&white gradient float hue = 0f; float saturation = 0f; float value = 1f - ((float) col / (float) columns); |