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 /compatibility-server | |
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 'compatibility-server')
17 files changed, 31 insertions, 31 deletions
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractInMemoryContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractInMemoryContainer.java index 100a8df49b..61d9d4f55f 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractInMemoryContainer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractInMemoryContainer.java @@ -151,7 +151,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE } } - private static abstract class BaseItemAddOrRemoveEvent extends EventObject + private abstract static class BaseItemAddOrRemoveEvent extends EventObject implements Serializable { protected Object itemId; protected int index; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/FilesystemContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/FilesystemContainer.java index 9c71af7c5c..dd1f28305d 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/FilesystemContainer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/FilesystemContainer.java @@ -75,13 +75,13 @@ public class FilesystemContainer implements Container.Hierarchical { */ public static Collection<String> FILE_PROPERTIES; - private final static Method FILEITEM_LASTMODIFIED; + private static final Method FILEITEM_LASTMODIFIED; - private final static Method FILEITEM_NAME; + private static final Method FILEITEM_NAME; - private final static Method FILEITEM_ICON; + private static final Method FILEITEM_ICON; - private final static Method FILEITEM_SIZE; + private static final Method FILEITEM_SIZE; static { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertyFormatter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertyFormatter.java index 7b26eccfc6..2e1ac13e9a 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertyFormatter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertyFormatter.java @@ -182,7 +182,7 @@ public abstract class PropertyFormatter<T> extends AbstractProperty<String> * datasource. * @return */ - abstract public String format(T value); + public abstract String format(T value); /** * Parse string and convert it to format compatible with datasource. @@ -196,7 +196,7 @@ public abstract class PropertyFormatter<T> extends AbstractProperty<String> * Any type of exception can be thrown to indicate that the * conversion was not succesful. */ - abstract public T parse(String formattedValue) throws Exception; + public abstract T parse(String formattedValue) throws Exception; /** * Sets the Property's read-only mode to the specified status. diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/TextFileProperty.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/TextFileProperty.java index b808357066..3dea636644 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/TextFileProperty.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/TextFileProperty.java @@ -99,7 +99,7 @@ public class TextFileProperty extends AbstractProperty<String> { : new InputStreamReader(fis, charset); BufferedReader r = new BufferedReader(isr); StringBuilder b = new StringBuilder(); - char buf[] = new char[8 * 1024]; + char[] buf = new char[8 * 1024]; int len; while ((len = r.read(buf)) != -1) { b.append(buf, 0, len); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DefaultConverterFactory.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DefaultConverterFactory.java index acfba8abfd..53eacc20e2 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DefaultConverterFactory.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DefaultConverterFactory.java @@ -39,7 +39,7 @@ import com.vaadin.server.VaadinSession; @Deprecated public class DefaultConverterFactory implements ConverterFactory { - private final static Logger log = Logger + private static final Logger log = Logger .getLogger(DefaultConverterFactory.class.getName()); @Override diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/ColumnProperty.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/ColumnProperty.java index 45ef2cd57e..b1fc3738ed 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/ColumnProperty.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/ColumnProperty.java @@ -33,7 +33,7 @@ import com.vaadin.v7.data.util.converter.Converter.ConversionException; * @deprecated As of 8.0, no replacement available. */ @Deprecated -final public class ColumnProperty implements Property { +public final class ColumnProperty implements Property { private static final long serialVersionUID = -3694463129581802457L; private RowItem owner; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/SQLContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/SQLContainer.java index 5750de6b36..070b15fc5c 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/SQLContainer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/SQLContainer.java @@ -159,7 +159,7 @@ public class SQLContainer implements Container, Container.Filterable, @Override public Object addItem() throws UnsupportedOperationException { - Object emptyKey[] = new Object[queryDelegate.getPrimaryKeyColumns() + Object[] emptyKey = new Object[queryDelegate.getPrimaryKeyColumns() .size()]; RowId itemId = new TemporaryRowId(emptyKey); // Create new empty column properties for the row item. diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/QueryBuilder.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/QueryBuilder.java index d1c884c360..b435757e8e 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/QueryBuilder.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/QueryBuilder.java @@ -45,7 +45,7 @@ public class QueryBuilder implements Serializable { addFilterTranslator(new SimpleStringTranslator()); } - public synchronized static void addFilterTranslator( + public static synchronized void addFilterTranslator( FilterTranslator translator) { filterTranslators.add(translator); } @@ -79,7 +79,7 @@ public class QueryBuilder implements Serializable { * the statement helper to update with the value(s) of the filter * @return a string representing the filter. */ - public synchronized static String getWhereStringForFilter(Filter filter, + public static synchronized String getWhereStringForFilter(Filter filter, StatementHelper sh) { for (FilterTranslator ft : filterTranslators) { if (ft.translatesFilter(filter)) { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/event/FieldEvents.java b/compatibility-server/src/main/java/com/vaadin/v7/event/FieldEvents.java index dac491bc27..5c5b4d21ed 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/event/FieldEvents.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/event/FieldEvents.java @@ -124,7 +124,7 @@ public interface FieldEvents { * @since 6.5 */ @Deprecated - public static abstract class TextChangeEvent extends Component.Event { + public abstract static class TextChangeEvent extends Component.Event { public TextChangeEvent(Component source) { super(source); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractColorPicker.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractColorPicker.java index 2b6e9b43bf..baa8f1b34e 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractColorPicker.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractColorPicker.java @@ -437,7 +437,7 @@ public abstract class AbstractColorPicker extends AbstractLegacyComponent * Sets the default styles of the component * */ - abstract protected void setDefaultStyles(); + protected abstract void setDefaultStyles(); /** * Shows a popup-window for color selection. diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java index e89c72fa4c..70fabdc9b3 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java @@ -2046,7 +2046,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements * @since 6.3 * */ - private static abstract class AbstractItemSetCriterion + private abstract static class AbstractItemSetCriterion extends ClientSideCriterion { protected final Collection<Object> itemIds = new HashSet<Object>(); protected AbstractSelect select; 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 4315990d3a..2b480437cf 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 @@ -327,7 +327,7 @@ public class Grid extends AbstractComponent * @since 7.6.1 */ @Deprecated - public final static class DetailComponentManager + public static final class DetailComponentManager extends AbstractGridExtension implements DataGenerator { /** @@ -982,7 +982,7 @@ public class Grid extends AbstractComponent * Base class for editor related events */ @Deprecated - public static abstract class EditorEvent extends Component.Event { + public abstract static class EditorEvent extends Component.Event { private Object itemID; @@ -1437,7 +1437,7 @@ public class Grid extends AbstractComponent * reusable. */ @Deprecated - public static abstract class AbstractSelectionModel extends + public abstract static class AbstractSelectionModel extends AbstractGridExtension implements SelectionModel, DataGenerator { protected final LinkedHashSet<Object> selection = new LinkedHashSet<Object>(); @@ -2646,7 +2646,7 @@ public class Grid extends AbstractComponent } } - abstract protected String getCellTagName(); + protected abstract String getCellTagName(); void detach() { for (CELLTYPE cell : cells.values()) { @@ -4314,7 +4314,7 @@ public class Grid extends AbstractComponent * the type this renderer knows how to present */ @Deprecated - public static abstract class AbstractRenderer<T> + public abstract static class AbstractRenderer<T> extends AbstractGridExtension implements Renderer<T> { private final Class<T> presentationType; @@ -4473,7 +4473,7 @@ public class Grid extends AbstractComponent * @since 7.5 */ @Deprecated - public static abstract class AbstractGridExtension + public abstract static class AbstractGridExtension extends AbstractExtension { /** 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 8fd401e393..65613d00cc 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 @@ -5232,7 +5232,7 @@ public class Table extends AbstractSelect implements Action.Container, * during that drag and drop operation. */ @Deprecated - public static abstract class TableDropCriterion + public abstract static class TableDropCriterion extends ServerSideCriterion { private Table table; 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 a5e272b604..a6e13f73c7 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 @@ -1636,7 +1636,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, * during that drag and drop operation. */ @Deprecated - public static abstract class TreeDropCriterion extends ServerSideCriterion { + public abstract static class TreeDropCriterion extends ServerSideCriterion { private Tree tree; diff --git a/compatibility-server/src/test/java/com/vaadin/v7/data/util/BeanItemContainerGenerator.java b/compatibility-server/src/test/java/com/vaadin/v7/data/util/BeanItemContainerGenerator.java index 2bc90c175c..f750651157 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/data/util/BeanItemContainerGenerator.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/data/util/BeanItemContainerGenerator.java @@ -6,9 +6,9 @@ import java.util.concurrent.atomic.AtomicLong; public class BeanItemContainerGenerator { public static class PortableRandom { - private final static long multiplier = 0x5DEECE66DL; - private final static long addend = 0xBL; - private final static long mask = (1L << 48) - 1; + private static final long multiplier = 0x5DEECE66DL; + private static final long addend = 0xBL; + private static final long mask = (1L << 48) - 1; private AtomicLong seed; public PortableRandom(long seed) { diff --git a/compatibility-server/src/test/java/com/vaadin/v7/data/util/PerformanceTestIndexedContainerTest.java b/compatibility-server/src/test/java/com/vaadin/v7/data/util/PerformanceTestIndexedContainerTest.java index 516e4eb63d..a22b704b84 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/data/util/PerformanceTestIndexedContainerTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/data/util/PerformanceTestIndexedContainerTest.java @@ -12,7 +12,7 @@ import org.junit.Test; public class PerformanceTestIndexedContainerTest { private static final int REPEATS = 10; - private final static int ITEMS = 50000; + private static final int ITEMS = 50000; private static final long ADD_ITEM_FAIL_THRESHOLD = 200; // TODO should improve performance of these methods private static final long ADD_ITEM_AT_FAIL_THRESHOLD = 5000; diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/ContextClickListenerTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/ContextClickListenerTest.java index df833b0cba..b84388ad9c 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/ContextClickListenerTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/ContextClickListenerTest.java @@ -41,11 +41,11 @@ import com.vaadin.v7.ui.Table.TableContextClickEvent; */ public class ContextClickListenerTest extends AbstractComponent { - private final static ContextClickEvent contextClickEvent = EasyMock + private static final ContextClickEvent contextClickEvent = EasyMock .createMock(ContextClickEvent.class); - private final static GridContextClickEvent gridContextClickEvent = EasyMock + private static final GridContextClickEvent gridContextClickEvent = EasyMock .createMock(GridContextClickEvent.class); - private final static TableContextClickEvent tableContextClickEvent = EasyMock + private static final TableContextClickEvent tableContextClickEvent = EasyMock .createMock(TableContextClickEvent.class); private final AssertListener contextListener = new AssertListener(); |