diff options
author | Artur Signell <artur.signell@itmill.com> | 2009-04-17 15:02:33 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2009-04-17 15:02:33 +0000 |
commit | 2bd4106c653cf87e63532977d43c787288cf4918 (patch) | |
tree | 5ba193bd987c84dfe9cd719b32e213d7c4b9d6a2 | |
parent | 38ebfd1a0edb1cc8f16c9138cc714b8671a544a9 (diff) | |
download | vaadin-framework-2bd4106c653cf87e63532977d43c787288cf4918.tar.gz vaadin-framework-2bd4106c653cf87e63532977d43c787288cf4918.zip |
Removed serialVersionUIDs, added serial warning suppression
svn changeset:7461/svn branch:6.0
18 files changed, 23 insertions, 62 deletions
diff --git a/src/com/itmill/toolkit/automatedtests/ComponentsInTable.java b/src/com/itmill/toolkit/automatedtests/ComponentsInTable.java index 48a71213e7..4ac547bb0e 100644 --- a/src/com/itmill/toolkit/automatedtests/ComponentsInTable.java +++ b/src/com/itmill/toolkit/automatedtests/ComponentsInTable.java @@ -14,10 +14,9 @@ import com.itmill.toolkit.ui.OrderedLayout; import com.itmill.toolkit.ui.Table;
import com.itmill.toolkit.ui.Button.ClickEvent;
+@SuppressWarnings("serial")
public class ComponentsInTable extends CustomComponent {
- private static final long serialVersionUID = 7179313717613510935L;
-
public ComponentsInTable(int cols, int rows) {
final OrderedLayout main = new OrderedLayout();
setCompositionRoot(main);
@@ -42,7 +41,6 @@ public class ComponentsInTable extends CustomComponent { content.add(new Button("b" + i, new Button.ClickListener() {
public void buttonClick(ClickEvent event) {
- Button b = event.getButton();
System.out.println(event.getButton().getCaption()
+ " click: " + (new Date()).toGMTString());
System.out.println(event.getButton().getApplication());
diff --git a/src/com/itmill/toolkit/automatedtests/SimplestApplication.java b/src/com/itmill/toolkit/automatedtests/SimplestApplication.java index b21c1cd7b8..fef17670c1 100644 --- a/src/com/itmill/toolkit/automatedtests/SimplestApplication.java +++ b/src/com/itmill/toolkit/automatedtests/SimplestApplication.java @@ -7,8 +7,8 @@ package com.itmill.toolkit.automatedtests; import com.itmill.toolkit.ui.Label; import com.itmill.toolkit.ui.Window; +@SuppressWarnings("serial") public class SimplestApplication extends com.itmill.toolkit.Application { - private static final long serialVersionUID = 1401107566407830534L; @Override public void init() { diff --git a/src/com/itmill/toolkit/automatedtests/featurebrowser/AccordionExample.java b/src/com/itmill/toolkit/automatedtests/featurebrowser/AccordionExample.java index e7609d9713..4d35a85bb5 100644 --- a/src/com/itmill/toolkit/automatedtests/featurebrowser/AccordionExample.java +++ b/src/com/itmill/toolkit/automatedtests/featurebrowser/AccordionExample.java @@ -10,8 +10,8 @@ import com.itmill.toolkit.ui.VerticalLayout; * Accordion is a derivative of TabSheet, a vertical tabbed layout that places * the tab contents between the vertical tabs. */ +@SuppressWarnings("serial") public class AccordionExample extends CustomComponent { - private static final long serialVersionUID = 7172404542359409349L; public AccordionExample() { // Create a new accordion diff --git a/src/com/itmill/toolkit/automatedtests/featurebrowser/ButtonExample.java b/src/com/itmill/toolkit/automatedtests/featurebrowser/ButtonExample.java index ba7296fd13..f9c3b18fea 100644 --- a/src/com/itmill/toolkit/automatedtests/featurebrowser/ButtonExample.java +++ b/src/com/itmill/toolkit/automatedtests/featurebrowser/ButtonExample.java @@ -21,11 +21,10 @@ import com.itmill.toolkit.ui.Button.ClickEvent; *
* @author IT Mill Ltd.
*/
+@SuppressWarnings("serial")
public class ButtonExample extends CustomComponent implements
Button.ClickListener {
- private static final long serialVersionUID = -3934416497726624080L;
-
public ButtonExample() {
final VerticalLayout main = new VerticalLayout();
diff --git a/src/com/itmill/toolkit/automatedtests/featurebrowser/ClientCachingExample.java b/src/com/itmill/toolkit/automatedtests/featurebrowser/ClientCachingExample.java index b43770d45f..af4b6e8827 100644 --- a/src/com/itmill/toolkit/automatedtests/featurebrowser/ClientCachingExample.java +++ b/src/com/itmill/toolkit/automatedtests/featurebrowser/ClientCachingExample.java @@ -21,9 +21,9 @@ import com.itmill.toolkit.ui.VerticalLayout; *
* @author IT Mill Ltd.
*/
+@SuppressWarnings("serial")
public class ClientCachingExample extends CustomComponent {
- private static final long serialVersionUID = -1033520074262036031L;
private static final String msg = "This example is a (simple) demonstration of client-side caching."
+ " The content in one tab is intentionally made very slow to"
+ " 'produce' server-side. When you changes to this tab for the"
@@ -53,7 +53,6 @@ public class ClientCachingExample extends CustomComponent { layout = new VerticalLayout();
layout.setMargin(true);
l = new Label("Slow label - until cached client side.") {
- private static final long serialVersionUID = -2741194381200799815L;
@Override
public void paintContent(PaintTarget target) throws PaintException {
diff --git a/src/com/itmill/toolkit/automatedtests/featurebrowser/ComboBoxExample.java b/src/com/itmill/toolkit/automatedtests/featurebrowser/ComboBoxExample.java index 312c7b27d2..130b9187b6 100644 --- a/src/com/itmill/toolkit/automatedtests/featurebrowser/ComboBoxExample.java +++ b/src/com/itmill/toolkit/automatedtests/featurebrowser/ComboBoxExample.java @@ -14,10 +14,9 @@ import com.itmill.toolkit.ui.AbstractSelect.Filtering; /** * */ +@SuppressWarnings("serial") public class ComboBoxExample extends CustomComponent { - private static final long serialVersionUID = 1580175413996261572L; - private static final String[] firstnames = new String[] { "John", "Mary", "Joe", "Sarah", "Jeff", "Jane", "Peter", "Marc", "Robert", "Paula", "Lenny", "Kenny", "Nathan", "Nicole", "Laura", "Jos", "Josie", diff --git a/src/com/itmill/toolkit/automatedtests/featurebrowser/EmbeddedBrowserExample.java b/src/com/itmill/toolkit/automatedtests/featurebrowser/EmbeddedBrowserExample.java index cd60dbd2bd..d5d54fa798 100644 --- a/src/com/itmill/toolkit/automatedtests/featurebrowser/EmbeddedBrowserExample.java +++ b/src/com/itmill/toolkit/automatedtests/featurebrowser/EmbeddedBrowserExample.java @@ -21,11 +21,10 @@ import com.itmill.toolkit.ui.Window.Notification; * @author IT Mill Ltd. * @see com.itmill.toolkit.ui.Window */ +@SuppressWarnings("serial") public class EmbeddedBrowserExample extends VerticalLayout implements Select.ValueChangeListener { - private static final long serialVersionUID = -6209869808788169597L; - // Default URL to open. private static final String DEFAULT_URL = "http://www.itmill.com/index_itmill_toolkit.htm"; diff --git a/src/com/itmill/toolkit/automatedtests/featurebrowser/FeatureBrowser.java b/src/com/itmill/toolkit/automatedtests/featurebrowser/FeatureBrowser.java index 2c22926e2f..5e235aea6e 100644 --- a/src/com/itmill/toolkit/automatedtests/featurebrowser/FeatureBrowser.java +++ b/src/com/itmill/toolkit/automatedtests/featurebrowser/FeatureBrowser.java @@ -36,10 +36,10 @@ import com.itmill.toolkit.ui.Button.ClickEvent; * @author IT Mill Ltd. * @see com.itmill.toolkit.ui.Window */ +@SuppressWarnings("serial") public class FeatureBrowser extends com.itmill.toolkit.Application implements Select.ValueChangeListener { - private static final long serialVersionUID = -4653905515159295197L; // Property IDs private static final Object PROPERTY_ID_CATEGORY = "Category"; @@ -209,7 +209,6 @@ public class FeatureBrowser extends com.itmill.toolkit.Application implements final HorizontalLayout wbLayout = new HorizontalLayout(); Button b = new Button("Open in sub-window", new Button.ClickListener() { - private static final long serialVersionUID = -9168589977880405848L; public void buttonClick(ClickEvent event) { Component component = (Component) ts.getComponentIterator() @@ -236,8 +235,6 @@ public class FeatureBrowser extends com.itmill.toolkit.Application implements wbLayout.addComponent(b); b = new Button("Open in native window", new Button.ClickListener() { - private static final long serialVersionUID = 3847765713639897223L; - public void buttonClick(ClickEvent event) { Component component = (Component) ts.getComponentIterator() .next(); diff --git a/src/com/itmill/toolkit/automatedtests/featurebrowser/FormExample.java b/src/com/itmill/toolkit/automatedtests/featurebrowser/FormExample.java index 290a2ca1bf..58e606b654 100644 --- a/src/com/itmill/toolkit/automatedtests/featurebrowser/FormExample.java +++ b/src/com/itmill/toolkit/automatedtests/featurebrowser/FormExample.java @@ -25,9 +25,9 @@ import com.itmill.toolkit.ui.Button.ClickEvent; * more complex than real use, as it tries to demonstrate more features than * needed in general case. */ +@SuppressWarnings("serial") public class FormExample extends CustomComponent { - private static final long serialVersionUID = -5382205369084031674L; static final String cities[] = { "Amsterdam", "Berlin", "Helsinki", "Hong Kong", "London", "Luxemburg", "New York", "Oslo", "Paris", "Rome", "Stockholm", "Tokyo", "Turku" }; @@ -39,7 +39,6 @@ public class FormExample extends CustomComponent { final Address dataModel = new Address(); Button peekDataModelState = new Button("Show the data model state", new Button.ClickListener() { - private static final long serialVersionUID = -9128707564903086213L; public void buttonClick(ClickEvent event) { getWindow().showNotification( @@ -66,8 +65,6 @@ public class FormExample extends CustomComponent { public static class AddressForm extends Form { - private static final long serialVersionUID = -1356475197391501301L; - public AddressForm(String caption) { setCaption(caption); @@ -124,8 +121,6 @@ public class FormExample extends CustomComponent { static class MyFieldFactory extends BaseFieldFactory implements Serializable { - private static final long serialVersionUID = 4993348078809959988L; - @Override public Field createField(Item item, Object propertyId, Component uiContext) { @@ -148,8 +143,6 @@ public class FormExample extends CustomComponent { */ static class PostalCodeValidator implements Validator { - private static final long serialVersionUID = -7635596091609806427L; - public boolean isValid(Object value) { if (value == null || !(value instanceof String)) { return false; @@ -173,7 +166,6 @@ public class FormExample extends CustomComponent { */ public static class Address implements Serializable { - private static final long serialVersionUID = 6238878890199428556L; String name = ""; String streetAddress = ""; String postalCode = ""; diff --git a/src/com/itmill/toolkit/automatedtests/featurebrowser/GeneratedColumnExample.java b/src/com/itmill/toolkit/automatedtests/featurebrowser/GeneratedColumnExample.java index 4872a670fb..5b9e4d86eb 100644 --- a/src/com/itmill/toolkit/automatedtests/featurebrowser/GeneratedColumnExample.java +++ b/src/com/itmill/toolkit/automatedtests/featurebrowser/GeneratedColumnExample.java @@ -36,6 +36,7 @@ import com.itmill.toolkit.ui.Button.ClickListener; * * @author magi */ +@SuppressWarnings("serial") public class GeneratedColumnExample extends CustomComponent { /** @@ -368,8 +369,6 @@ public class GeneratedColumnExample extends CustomComponent { /** Table column generator for calculating consumption column. */ class ConsumptionColumnGenerator implements Table.ColumnGenerator { - private static final long serialVersionUID = -1077081052659001251L; - /** * Generates a cell containing value calculated from the item. */ diff --git a/src/com/itmill/toolkit/automatedtests/util/StatusServlet.java b/src/com/itmill/toolkit/automatedtests/util/StatusServlet.java index 9912b23d1b..caf44abc89 100644 --- a/src/com/itmill/toolkit/automatedtests/util/StatusServlet.java +++ b/src/com/itmill/toolkit/automatedtests/util/StatusServlet.java @@ -15,10 +15,9 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +@SuppressWarnings("serial") public class StatusServlet extends HttpServlet { - private static final long serialVersionUID = -6764317622536660947L; - public static DateFormat dfHuman = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss"); diff --git a/src/com/itmill/toolkit/data/Validator.java b/src/com/itmill/toolkit/data/Validator.java index 15fea5de34..55626fb040 100644 --- a/src/com/itmill/toolkit/data/Validator.java +++ b/src/com/itmill/toolkit/data/Validator.java @@ -59,14 +59,10 @@ public interface Validator extends Serializable { * @VERSION@ * @since 3.0 */ + @SuppressWarnings("serial") public class InvalidValueException extends RuntimeException implements ErrorMessage { - /** - * Serial generated by eclipse. - */ - private static final long serialVersionUID = 3689073941163422257L; - /** Array of validation errors that are causing the problem. */ private InvalidValueException[] causes = null; @@ -173,11 +169,8 @@ public interface Validator extends Serializable { } + @SuppressWarnings("serial") public class EmptyValueException extends Validator.InvalidValueException { - /** - * Serial generated by eclipse. - */ - private static final long serialVersionUID = -4488988853486652602L; public EmptyValueException(String message) { super(message); diff --git a/src/com/itmill/toolkit/demo/sampler/ActiveLink.java b/src/com/itmill/toolkit/demo/sampler/ActiveLink.java index 51cb8afe6c..252a7b12e0 100644 --- a/src/com/itmill/toolkit/demo/sampler/ActiveLink.java +++ b/src/com/itmill/toolkit/demo/sampler/ActiveLink.java @@ -13,6 +13,7 @@ import com.itmill.toolkit.ui.Link; import com.itmill.toolkit.ui.Button.ClickEvent; import com.itmill.toolkit.ui.Button.ClickListener; +@SuppressWarnings("serial") public class ActiveLink extends Link { private static final String TAG = "activelink"; @@ -111,8 +112,6 @@ public class ActiveLink extends Link { public class LinkActivatedEvent extends Component.Event { - private static final long serialVersionUID = -6406243194818230362L; - private boolean linkOpened; /** diff --git a/src/com/itmill/toolkit/demo/sampler/ModeSwitch.java b/src/com/itmill/toolkit/demo/sampler/ModeSwitch.java index d662d421c9..fb6b1d791e 100644 --- a/src/com/itmill/toolkit/demo/sampler/ModeSwitch.java +++ b/src/com/itmill/toolkit/demo/sampler/ModeSwitch.java @@ -9,6 +9,7 @@ import com.itmill.toolkit.ui.CustomComponent; import com.itmill.toolkit.ui.GridLayout; import com.itmill.toolkit.ui.Button.ClickEvent; +@SuppressWarnings("serial") public class ModeSwitch extends CustomComponent { GridLayout layout = new GridLayout(3, 1); @@ -92,7 +93,6 @@ public class ModeSwitch extends CustomComponent { } public class ModeSwitchEvent extends Event { - private static final long serialVersionUID = -576318750089478453L; public ModeSwitchEvent() { super(ModeSwitch.this); diff --git a/src/com/itmill/toolkit/demo/sampler/features/form/FormPojoExample.java b/src/com/itmill/toolkit/demo/sampler/features/form/FormPojoExample.java index a4e3e0f731..22ed844fd4 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/form/FormPojoExample.java +++ b/src/com/itmill/toolkit/demo/sampler/features/form/FormPojoExample.java @@ -1,5 +1,6 @@ package com.itmill.toolkit.demo.sampler.features.form; +import java.io.Serializable; import java.util.Arrays; import java.util.Date; import java.util.UUID; @@ -21,6 +22,7 @@ import com.itmill.toolkit.ui.VerticalLayout; import com.itmill.toolkit.ui.Window; import com.itmill.toolkit.ui.Button.ClickEvent; +@SuppressWarnings("serial") public class FormPojoExample extends VerticalLayout { // the 'POJO' we're editing @@ -101,7 +103,8 @@ public class FormPojoExample extends VerticalLayout { public PersonFieldFactory() { countries.setWidth("30em"); - countries.setContainerDataSource(ExampleUtil.getStaticISO3166Container()); + countries.setContainerDataSource(ExampleUtil + .getStaticISO3166Container()); countries .setItemCaptionPropertyId(ExampleUtil.iso3166_PROPERTY_NAME); countries.setItemIconPropertyId(ExampleUtil.iso3166_PROPERTY_FLAG); @@ -152,7 +155,8 @@ public class FormPojoExample extends VerticalLayout { } } - public class Person { + public class Person implements Serializable { + private String firstName = ""; private String lastName = ""; private Date birthdate; diff --git a/src/com/itmill/toolkit/terminal/gwt/client/LocaleNotLoadedException.java b/src/com/itmill/toolkit/terminal/gwt/client/LocaleNotLoadedException.java index 39c38bdd49..25a7058f5d 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/LocaleNotLoadedException.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/LocaleNotLoadedException.java @@ -4,13 +4,9 @@ package com.itmill.toolkit.terminal.gwt.client;
+@SuppressWarnings("serial")
public class LocaleNotLoadedException extends Exception {
- /**
- * Serial generated by Eclipse.
- */
- private static final long serialVersionUID = 2005227056545210838L;
-
public LocaleNotLoadedException(String locale) {
super(locale);
}
diff --git a/src/com/itmill/toolkit/tests/tickets/Ticket695.java b/src/com/itmill/toolkit/tests/tickets/Ticket695.java index 8e45c4ca5c..c37ee50c51 100644 --- a/src/com/itmill/toolkit/tests/tickets/Ticket695.java +++ b/src/com/itmill/toolkit/tests/tickets/Ticket695.java @@ -9,10 +9,9 @@ import com.itmill.toolkit.ui.Button; import com.itmill.toolkit.ui.Window; import com.itmill.toolkit.ui.Button.ClickEvent; +@SuppressWarnings("serial") public class Ticket695 extends Application { - private static final long serialVersionUID = 3803150085397590662L; - @Override public void init() { final Window w = new Window("Serialization test #695"); diff --git a/src/com/itmill/toolkit/ui/Upload.java b/src/com/itmill/toolkit/ui/Upload.java index e053d99fab..2b4620f322 100644 --- a/src/com/itmill/toolkit/ui/Upload.java +++ b/src/com/itmill/toolkit/ui/Upload.java @@ -293,8 +293,6 @@ public class Upload extends AbstractComponent implements Component.Focusable { */ public class FinishedEvent extends Component.Event { - private static final long serialVersionUID = 3257288015385670969L; - /** * Length of the received file. */ @@ -378,8 +376,6 @@ public class Upload extends AbstractComponent implements Component.Focusable { */ public class FailedEvent extends FinishedEvent { - private static final long serialVersionUID = 3833746590157386293L; - private Exception reason = null; /** @@ -425,8 +421,6 @@ public class Upload extends AbstractComponent implements Component.Focusable { */ public class NoOutputStreamEvent extends FailedEvent { - private static final long serialVersionUID = 4745219890852396500L; - /** * * @param source @@ -445,8 +439,6 @@ public class Upload extends AbstractComponent implements Component.Focusable { */ public class NoInputStreamEvent extends FailedEvent { - private static final long serialVersionUID = -529960205445737170L; - /** * * @param source @@ -471,8 +463,6 @@ public class Upload extends AbstractComponent implements Component.Focusable { */ public class SucceededEvent extends FinishedEvent { - private static final long serialVersionUID = 3256445798169524023L; - /** * * @param source @@ -497,7 +487,6 @@ public class Upload extends AbstractComponent implements Component.Focusable { */ public class StartedEvent extends Component.Event { - private static final long serialVersionUID = -3984393770487403525L; private final String filename; private final String type; |