diff options
author | Ahmed Ashour <asashour@yahoo.com> | 2017-09-21 14:25:46 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-09-21 15:25:46 +0300 |
commit | 11ddb11cbc72b0ee233e503058d4e104030e4aa3 (patch) | |
tree | a3cef3be53ee41bba3d8ab8b64b0e10b2483a5fa /server/src/main/java/com/vaadin/ui | |
parent | e118f4d860adeaca1690ef095906ae6be84f3cb5 (diff) | |
download | vaadin-framework-11ddb11cbc72b0ee233e503058d4e104030e4aa3.tar.gz vaadin-framework-11ddb11cbc72b0ee233e503058d4e104030e4aa3.zip |
Update modifier order to follow Java Specification suggestions (#10050)
Also includes some other minor cleanup.
Diffstat (limited to 'server/src/main/java/com/vaadin/ui')
5 files changed, 10 insertions, 10 deletions
diff --git a/server/src/main/java/com/vaadin/ui/AbstractLocalDateField.java b/server/src/main/java/com/vaadin/ui/AbstractLocalDateField.java index 2fdf2bf382..2584eaf6ea 100644 --- a/server/src/main/java/com/vaadin/ui/AbstractLocalDateField.java +++ b/server/src/main/java/com/vaadin/ui/AbstractLocalDateField.java @@ -144,7 +144,7 @@ public abstract class AbstractLocalDateField if (value == null) return ""; DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT); Locale locale = getLocale(); - if (locale != null){ + if (locale != null) { dateTimeFormatter = dateTimeFormatter.withLocale(locale); } return value.format(dateTimeFormatter); diff --git a/server/src/main/java/com/vaadin/ui/Composite.java b/server/src/main/java/com/vaadin/ui/Composite.java index 755b25b742..fcdbf4b04f 100644 --- a/server/src/main/java/com/vaadin/ui/Composite.java +++ b/server/src/main/java/com/vaadin/ui/Composite.java @@ -183,7 +183,7 @@ public class Composite extends AbstractComponent implements HasComponents { private Component getRootOrThrow() { Component root = getCompositionRoot(); - if(root == null) throw new IllegalStateException("Composition root has not been set"); + if (root == null) throw new IllegalStateException("Composition root has not been set"); return root; } @@ -202,7 +202,7 @@ public class Composite extends AbstractComponent implements HasComponents { private <T> T getRootAbstractComponentPropertyOrNull(SerializableFunction<AbstractComponent, T> getter) { Component root = getCompositionRoot(); - if(root instanceof AbstractComponent) { + if (root instanceof AbstractComponent) { return getter.apply((AbstractComponent) root); } return null; diff --git a/server/src/main/java/com/vaadin/ui/MenuBar.java b/server/src/main/java/com/vaadin/ui/MenuBar.java index 39d66bd0b0..35988bb84d 100644 --- a/server/src/main/java/com/vaadin/ui/MenuBar.java +++ b/server/src/main/java/com/vaadin/ui/MenuBar.java @@ -199,8 +199,8 @@ public class MenuBar extends AbstractComponent tmpItem.getCommand().menuSelected(tmpItem); } } - } // if - }// changeVariables + } + } /** * Constructs an empty, horizontal menu @@ -941,7 +941,7 @@ public class MenuBar extends AbstractComponent this.checked = checked; markAsDirty(); } - }// class MenuItem + } @Override public void writeDesign(Element design, DesignContext designContext) { @@ -1091,4 +1091,4 @@ public class MenuBar extends AbstractComponent result.add("html-content-allowed"); return result; } -}// class MenuBar +} diff --git a/server/src/main/java/com/vaadin/ui/Tree.java b/server/src/main/java/com/vaadin/ui/Tree.java index 3858975f06..e54d8e052a 100644 --- a/server/src/main/java/com/vaadin/ui/Tree.java +++ b/server/src/main/java/com/vaadin/ui/Tree.java @@ -235,7 +235,7 @@ public class Tree<T> extends Composite * * @since 8.1 */ - public final static class TreeMultiSelectionModel<T> + public static final class TreeMultiSelectionModel<T> extends MultiSelectionModelImpl<T> { @Override diff --git a/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java b/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java index 0fbfe9c6b5..cdf0c6aaee 100644 --- a/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java +++ b/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java @@ -58,10 +58,10 @@ public class DesignAttributeHandler implements Serializable { return Logger.getLogger(DesignAttributeHandler.class.getName()); } - private final static Map<Class<?>, AttributeCacheEntry> cache = new ConcurrentHashMap<>(); + private static final Map<Class<?>, AttributeCacheEntry> cache = new ConcurrentHashMap<>(); // translates string <-> object - private final static DesignFormatter FORMATTER = new DesignFormatter(); + private static final DesignFormatter FORMATTER = new DesignFormatter(); /** * Returns the currently used formatter. All primitive types and all types |