diff options
Diffstat (limited to 'server/src/main/java/com')
67 files changed, 110 insertions, 111 deletions
diff --git a/server/src/main/java/com/vaadin/data/Binder.java b/server/src/main/java/com/vaadin/data/Binder.java index 7912a55d72..2763c7f788 100644 --- a/server/src/main/java/com/vaadin/data/Binder.java +++ b/server/src/main/java/com/vaadin/data/Binder.java @@ -794,7 +794,7 @@ public class Binder<BEAN> implements Serializable { */ private static class ValidatorAsConverter<T> implements Converter<T, T> { - private Validator<? super T> validator; + private final Validator<? super T> validator; /** * Creates a new converter wrapping the given validator. diff --git a/server/src/main/java/com/vaadin/data/validator/AbstractValidator.java b/server/src/main/java/com/vaadin/data/validator/AbstractValidator.java index 793797ee3f..b6467b07b9 100644 --- a/server/src/main/java/com/vaadin/data/validator/AbstractValidator.java +++ b/server/src/main/java/com/vaadin/data/validator/AbstractValidator.java @@ -31,7 +31,7 @@ import com.vaadin.server.SerializableFunction; */ public abstract class AbstractValidator<T> implements Validator<T> { - private SerializableFunction<T, String> messageProvider; + private final SerializableFunction<T, String> messageProvider; /** * Constructs a validator with the given error message. The substring "{0}" diff --git a/server/src/main/java/com/vaadin/data/validator/RangeValidator.java b/server/src/main/java/com/vaadin/data/validator/RangeValidator.java index b8ad387308..2f966f81ee 100644 --- a/server/src/main/java/com/vaadin/data/validator/RangeValidator.java +++ b/server/src/main/java/com/vaadin/data/validator/RangeValidator.java @@ -35,7 +35,7 @@ public class RangeValidator<T> extends AbstractValidator<T> { private T maxValue = null; private boolean minValueIncluded = true; private boolean maxValueIncluded = true; - private Comparator<? super T> comparator; + private final Comparator<? super T> comparator; /** * Creates a new range validator of the given type. Passing null to either diff --git a/server/src/main/java/com/vaadin/data/validator/StringLengthValidator.java b/server/src/main/java/com/vaadin/data/validator/StringLengthValidator.java index b3e1da18eb..f207e618ee 100644 --- a/server/src/main/java/com/vaadin/data/validator/StringLengthValidator.java +++ b/server/src/main/java/com/vaadin/data/validator/StringLengthValidator.java @@ -28,7 +28,7 @@ import com.vaadin.data.util.converter.ValueContext; @SuppressWarnings("serial") public class StringLengthValidator extends AbstractValidator<String> { - private RangeValidator<Integer> validator; + private final RangeValidator<Integer> validator; /** * Creates a new StringLengthValidator with a given error message and diff --git a/server/src/main/java/com/vaadin/event/FieldEvents.java b/server/src/main/java/com/vaadin/event/FieldEvents.java index bb14cc7339..b0e539961b 100644 --- a/server/src/main/java/com/vaadin/event/FieldEvents.java +++ b/server/src/main/java/com/vaadin/event/FieldEvents.java @@ -194,7 +194,7 @@ public interface FieldEvents { public static abstract class FocusAndBlurServerRpcImpl implements FocusAndBlurServerRpc { - private Component component; + private final Component component; public FocusAndBlurServerRpcImpl(Component component) { this.component = component; diff --git a/server/src/main/java/com/vaadin/event/MouseEvents.java b/server/src/main/java/com/vaadin/event/MouseEvents.java index d76759343a..e391ade401 100644 --- a/server/src/main/java/com/vaadin/event/MouseEvents.java +++ b/server/src/main/java/com/vaadin/event/MouseEvents.java @@ -60,7 +60,7 @@ public interface MouseEvents { */ @Deprecated public static final MouseButton BUTTON_RIGHT = MouseButton.RIGHT; - private MouseEventDetails details; + private final MouseEventDetails details; public ClickEvent(Component source, MouseEventDetails mouseEventDetails) { diff --git a/server/src/main/java/com/vaadin/event/TransferableImpl.java b/server/src/main/java/com/vaadin/event/TransferableImpl.java index 4da28176fc..7ea9ef7b23 100644 --- a/server/src/main/java/com/vaadin/event/TransferableImpl.java +++ b/server/src/main/java/com/vaadin/event/TransferableImpl.java @@ -28,7 +28,7 @@ import com.vaadin.ui.Component; */ public class TransferableImpl implements Transferable { private Map<String, Object> rawVariables = new HashMap<>(); - private Component sourceComponent; + private final Component sourceComponent; public TransferableImpl(Component sourceComponent, Map<String, Object> rawVariables) { diff --git a/server/src/main/java/com/vaadin/event/dd/DragAndDropEvent.java b/server/src/main/java/com/vaadin/event/dd/DragAndDropEvent.java index 062f8aff29..93491b4274 100644 --- a/server/src/main/java/com/vaadin/event/dd/DragAndDropEvent.java +++ b/server/src/main/java/com/vaadin/event/dd/DragAndDropEvent.java @@ -34,8 +34,8 @@ import com.vaadin.event.dd.acceptcriteria.AcceptCriterion; * */ public class DragAndDropEvent implements Serializable { - private Transferable transferable; - private TargetDetails dropTargetDetails; + private final Transferable transferable; + private final TargetDetails dropTargetDetails; public DragAndDropEvent(Transferable transferable, TargetDetails dropTargetDetails) { diff --git a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/AcceptAll.java b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/AcceptAll.java index 9694f6525b..b42d2b4684 100644 --- a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/AcceptAll.java +++ b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/AcceptAll.java @@ -32,7 +32,7 @@ import com.vaadin.event.dd.DragAndDropEvent; public final class AcceptAll extends ClientSideCriterion { private static final long serialVersionUID = 7406683402153141461L; - private static AcceptCriterion singleton = new AcceptAll(); + private static final AcceptCriterion singleton = new AcceptAll(); private AcceptAll() { } diff --git a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java index 42d666a4ce..c4fc645fec 100644 --- a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java +++ b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java @@ -32,7 +32,7 @@ import com.vaadin.server.PaintTarget; */ public class ContainsDataFlavor extends ClientSideCriterion { - private String dataFlavorId; + private final String dataFlavorId; /** * Constructs a new instance of {@link ContainsDataFlavor}. diff --git a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/Not.java b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/Not.java index 057e032d46..f194be7634 100644 --- a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/Not.java +++ b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/Not.java @@ -31,7 +31,7 @@ import com.vaadin.server.PaintTarget; public class Not extends ClientSideCriterion { private static final long serialVersionUID = 1131422338558613244L; - private AcceptCriterion acceptCriterion; + private final AcceptCriterion acceptCriterion; public Not(ClientSideCriterion acceptCriterion) { this.acceptCriterion = acceptCriterion; diff --git a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/Or.java b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/Or.java index 20bf507bbe..81ef37631f 100644 --- a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/Or.java +++ b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/Or.java @@ -33,7 +33,7 @@ import com.vaadin.server.PaintTarget; */ public class Or extends ClientSideCriterion { private static final long serialVersionUID = 1L; - private AcceptCriterion criteria[]; + private final AcceptCriterion criteria[]; /** * @param criteria diff --git a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIs.java b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIs.java index eaccceaca2..49ea24e5cb 100644 --- a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIs.java +++ b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIs.java @@ -36,7 +36,7 @@ import com.vaadin.ui.Component; @SuppressWarnings("serial") public class SourceIs extends ClientSideCriterion { - private Component[] components; + private final Component[] components; public SourceIs(Component... component) { components = component; diff --git a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java index 95fbaab85e..8cb16e4313 100644 --- a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java +++ b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java @@ -38,7 +38,7 @@ import com.vaadin.ui.Component; public class SourceIsTarget extends ClientSideCriterion { private static final long serialVersionUID = -451399314705532584L; - private static SourceIsTarget instance = new SourceIsTarget(); + private static final SourceIsTarget instance = new SourceIsTarget(); private SourceIsTarget() { } diff --git a/server/src/main/java/com/vaadin/server/AbstractClientConnector.java b/server/src/main/java/com/vaadin/server/AbstractClientConnector.java index f3e79d6579..01222a07dd 100644 --- a/server/src/main/java/com/vaadin/server/AbstractClientConnector.java +++ b/server/src/main/java/com/vaadin/server/AbstractClientConnector.java @@ -61,13 +61,13 @@ public abstract class AbstractClientConnector * A map from client to server RPC interface class name to the RPC call * manager that handles incoming RPC calls for that interface. */ - private Map<String, ServerRpcManager<?>> rpcManagerMap = new HashMap<>(); + private final Map<String, ServerRpcManager<?>> rpcManagerMap = new HashMap<>(); /** * A map from server to client RPC interface class to the RPC proxy that * sends ourgoing RPC calls for that interface. */ - private Map<Class<?>, ClientRpc> rpcProxyMap = new HashMap<>(); + private final Map<Class<?>, ClientRpc> rpcProxyMap = new HashMap<>(); /** * Shared state object to be communicated from the server to the client when @@ -84,7 +84,7 @@ public abstract class AbstractClientConnector private String connectorId; - private ArrayList<Extension> extensions = new ArrayList<>(); + private final ArrayList<Extension> extensions = new ArrayList<>(); /** * The EventRouter used for the event model. @@ -378,7 +378,7 @@ public abstract class AbstractClientConnector private class RpcInvocationHandler implements InvocationHandler, Serializable { - private String rpcInterfaceName; + private final String rpcInterfaceName; public RpcInvocationHandler(Class<?> rpcInterface) { rpcInterfaceName = rpcInterface.getName().replaceAll("\\$", "."); diff --git a/server/src/main/java/com/vaadin/server/AbstractErrorMessage.java b/server/src/main/java/com/vaadin/server/AbstractErrorMessage.java index 491462b53d..6ffbf6063e 100644 --- a/server/src/main/java/com/vaadin/server/AbstractErrorMessage.java +++ b/server/src/main/java/com/vaadin/server/AbstractErrorMessage.java @@ -63,7 +63,7 @@ public abstract class AbstractErrorMessage implements ErrorMessage { */ private ErrorLevel level = ErrorLevel.ERROR; - private List<ErrorMessage> causes = new ArrayList<>(); + private final List<ErrorMessage> causes = new ArrayList<>(); protected AbstractErrorMessage(String message) { this.message = message; diff --git a/server/src/main/java/com/vaadin/server/ClientConnector.java b/server/src/main/java/com/vaadin/server/ClientConnector.java index 80453d4733..b54a85029b 100644 --- a/server/src/main/java/com/vaadin/server/ClientConnector.java +++ b/server/src/main/java/com/vaadin/server/ClientConnector.java @@ -114,7 +114,7 @@ public interface ClientConnector extends Connector { public static class ConnectorErrorEvent extends com.vaadin.server.ErrorEvent { - private Connector connector; + private final Connector connector; public ConnectorErrorEvent(Connector connector, Throwable t) { super(t); diff --git a/server/src/main/java/com/vaadin/server/ClientMethodInvocation.java b/server/src/main/java/com/vaadin/server/ClientMethodInvocation.java index 28d5d2778d..acf5f3568f 100644 --- a/server/src/main/java/com/vaadin/server/ClientMethodInvocation.java +++ b/server/src/main/java/com/vaadin/server/ClientMethodInvocation.java @@ -39,7 +39,7 @@ public class ClientMethodInvocation private final String interfaceName; private final String methodName; private transient Object[] parameters; - private Type[] parameterTypes; + private final Type[] parameterTypes; // used for sorting calls between different connectors in the same UI private final long sequenceNumber; diff --git a/server/src/main/java/com/vaadin/server/ComponentSizeValidator.java b/server/src/main/java/com/vaadin/server/ComponentSizeValidator.java index da8231eec9..a9068495dc 100644 --- a/server/src/main/java/com/vaadin/server/ComponentSizeValidator.java +++ b/server/src/main/java/com/vaadin/server/ComponentSizeValidator.java @@ -631,9 +631,9 @@ public class ComponentSizeValidator implements Serializable { } - private static Map<Object, FileLocation> creationLocations = new HashMap<>(); - private static Map<Object, FileLocation> widthLocations = new HashMap<>(); - private static Map<Object, FileLocation> heightLocations = new HashMap<>(); + private static final Map<Object, FileLocation> creationLocations = new HashMap<>(); + private static final Map<Object, FileLocation> widthLocations = new HashMap<>(); + private static final Map<Object, FileLocation> heightLocations = new HashMap<>(); public static class FileLocation implements Serializable { public String method; diff --git a/server/src/main/java/com/vaadin/server/FontAwesome.java b/server/src/main/java/com/vaadin/server/FontAwesome.java index 2bb4a9abc8..2ce35328f6 100644 --- a/server/src/main/java/com/vaadin/server/FontAwesome.java +++ b/server/src/main/java/com/vaadin/server/FontAwesome.java @@ -731,7 +731,7 @@ public enum FontAwesome implements FontIcon { ; public static final String FONT_FAMILY = "FontAwesome"; - private int codepoint; + private final int codepoint; FontAwesome(int codepoint) { this.codepoint = codepoint; diff --git a/server/src/main/java/com/vaadin/server/JavaScriptCallbackHelper.java b/server/src/main/java/com/vaadin/server/JavaScriptCallbackHelper.java index 9b066a4ff8..7e228bb7ca 100644 --- a/server/src/main/java/com/vaadin/server/JavaScriptCallbackHelper.java +++ b/server/src/main/java/com/vaadin/server/JavaScriptCallbackHelper.java @@ -47,9 +47,9 @@ public class JavaScriptCallbackHelper implements Serializable { private static final Method CALL_METHOD = ReflectTools.findMethod( JavaScriptCallbackRpc.class, "call", String.class, JsonArray.class); - private AbstractClientConnector connector; + private final AbstractClientConnector connector; - private Map<String, JavaScriptFunction> callbacks = new HashMap<>(); + private final Map<String, JavaScriptFunction> callbacks = new HashMap<>(); private JavaScriptCallbackRpc javascriptCallbackRpc; public JavaScriptCallbackHelper(AbstractClientConnector connector) { diff --git a/server/src/main/java/com/vaadin/server/JsonCodec.java b/server/src/main/java/com/vaadin/server/JsonCodec.java index 588443d55b..a5725e3d45 100644 --- a/server/src/main/java/com/vaadin/server/JsonCodec.java +++ b/server/src/main/java/com/vaadin/server/JsonCodec.java @@ -204,17 +204,17 @@ public class JsonCodec implements Serializable { * happens to process Vaadin requests, so it must be protected from * corruption caused by concurrent access. */ - private static ConcurrentMap<Class<?>, Collection<BeanProperty>> typePropertyCache = new ConcurrentHashMap<>(); + private static final ConcurrentMap<Class<?>, Collection<BeanProperty>> typePropertyCache = new ConcurrentHashMap<>(); - private static Map<Class<?>, String> typeToTransportType = new HashMap<>(); + private static final Map<Class<?>, String> typeToTransportType = new HashMap<>(); /** * Note! This does not contain primitives. * <p> */ - private static Map<String, Class<?>> transportTypeToType = new HashMap<>(); + private static final Map<String, Class<?>> transportTypeToType = new HashMap<>(); - private static Map<Class<?>, JSONSerializer<?>> customSerializers = new HashMap<>(); + private static final Map<Class<?>, JSONSerializer<?>> customSerializers = new HashMap<>(); static { customSerializers.put(Date.class, new DateSerializer()); } diff --git a/server/src/main/java/com/vaadin/server/LegacyApplication.java b/server/src/main/java/com/vaadin/server/LegacyApplication.java index b417c0f9ee..599d9bb385 100644 --- a/server/src/main/java/com/vaadin/server/LegacyApplication.java +++ b/server/src/main/java/com/vaadin/server/LegacyApplication.java @@ -42,7 +42,7 @@ public abstract class LegacyApplication implements ErrorHandler { private LegacyWindow mainWindow; private String theme = "reindeer"; - private Map<String, LegacyWindow> legacyUINames = new HashMap<>(); + private final Map<String, LegacyWindow> legacyUINames = new HashMap<>(); private boolean isRunning = true; diff --git a/server/src/main/java/com/vaadin/server/LegacyCommunicationManager.java b/server/src/main/java/com/vaadin/server/LegacyCommunicationManager.java index 7c438ca999..3ef17b618a 100644 --- a/server/src/main/java/com/vaadin/server/LegacyCommunicationManager.java +++ b/server/src/main/java/com/vaadin/server/LegacyCommunicationManager.java @@ -69,7 +69,7 @@ public class LegacyCommunicationManager implements Serializable { private String requestThemeName; // TODO Refactor (#11413) - private Map<String, Class<?>> publishedFileContexts = new HashMap<>(); + private final Map<String, Class<?>> publishedFileContexts = new HashMap<>(); /** * TODO New constructor - document me! diff --git a/server/src/main/java/com/vaadin/server/LocaleService.java b/server/src/main/java/com/vaadin/server/LocaleService.java index 98bbc8275a..c2b28d1cab 100644 --- a/server/src/main/java/com/vaadin/server/LocaleService.java +++ b/server/src/main/java/com/vaadin/server/LocaleService.java @@ -41,9 +41,9 @@ import com.vaadin.ui.UI; */ public class LocaleService implements Serializable { - private UI ui; + private final UI ui; - private LocaleServiceState state; + private final LocaleServiceState state; /** * Creates a LocaleService bound to the given UI diff --git a/server/src/main/java/com/vaadin/server/Page.java b/server/src/main/java/com/vaadin/server/Page.java index d4eb2432f0..d067ffc7dc 100644 --- a/server/src/main/java/com/vaadin/server/Page.java +++ b/server/src/main/java/com/vaadin/server/Page.java @@ -333,7 +333,7 @@ public class Page implements Serializable { private static class InjectedStyleString implements InjectedStyle { - private String css; + private final String css; public InjectedStyleString(String css) { this.css = css; diff --git a/server/src/main/java/com/vaadin/server/RestrictedRenderResponse.java b/server/src/main/java/com/vaadin/server/RestrictedRenderResponse.java index 587bf0ae69..d62acfa8c0 100644 --- a/server/src/main/java/com/vaadin/server/RestrictedRenderResponse.java +++ b/server/src/main/java/com/vaadin/server/RestrictedRenderResponse.java @@ -40,7 +40,7 @@ import org.w3c.dom.Element; */ class RestrictedRenderResponse implements RenderResponse, Serializable { - private RenderResponse response; + private final RenderResponse response; RestrictedRenderResponse(RenderResponse response) { this.response = response; diff --git a/server/src/main/java/com/vaadin/server/SizeWithUnit.java b/server/src/main/java/com/vaadin/server/SizeWithUnit.java index 17624b4712..b53e4533f4 100644 --- a/server/src/main/java/com/vaadin/server/SizeWithUnit.java +++ b/server/src/main/java/com/vaadin/server/SizeWithUnit.java @@ -30,8 +30,8 @@ import com.vaadin.shared.util.SharedUtil; * @author Vaadin Ltd */ public class SizeWithUnit implements Serializable { - private float size; - private Unit unit; + private final float size; + private final Unit unit; private static final Pattern sizePattern = Pattern .compile(SharedUtil.SIZE_PATTERN); diff --git a/server/src/main/java/com/vaadin/server/Sizeable.java b/server/src/main/java/com/vaadin/server/Sizeable.java index d731908e31..f3fa8ed0cc 100644 --- a/server/src/main/java/com/vaadin/server/Sizeable.java +++ b/server/src/main/java/com/vaadin/server/Sizeable.java @@ -132,7 +132,7 @@ public interface Sizeable extends Serializable { */ PERCENTAGE("%"); - private String symbol; + private final String symbol; private Unit(String symbol) { this.symbol = symbol; diff --git a/server/src/main/java/com/vaadin/server/VaadinPortletResponse.java b/server/src/main/java/com/vaadin/server/VaadinPortletResponse.java index 4a739760f4..f7a5abadff 100644 --- a/server/src/main/java/com/vaadin/server/VaadinPortletResponse.java +++ b/server/src/main/java/com/vaadin/server/VaadinPortletResponse.java @@ -47,7 +47,7 @@ public class VaadinPortletResponse implements VaadinResponse { } private final PortletResponse response; - private VaadinPortletService vaadinService; + private final VaadinPortletService vaadinService; /** * Wraps a portlet response and an associated vaadin service diff --git a/server/src/main/java/com/vaadin/server/VaadinServletResponse.java b/server/src/main/java/com/vaadin/server/VaadinServletResponse.java index 07c3964f5d..7513dd4d97 100644 --- a/server/src/main/java/com/vaadin/server/VaadinServletResponse.java +++ b/server/src/main/java/com/vaadin/server/VaadinServletResponse.java @@ -31,7 +31,7 @@ import javax.servlet.http.HttpServletResponseWrapper; public class VaadinServletResponse extends HttpServletResponseWrapper implements VaadinResponse { - private VaadinServletService vaadinService; + private final VaadinServletService vaadinService; /** * Wraps a http servlet response and an associated vaadin service diff --git a/server/src/main/java/com/vaadin/server/VaadinSession.java b/server/src/main/java/com/vaadin/server/VaadinSession.java index d2cf4e740a..ebda81b9c7 100644 --- a/server/src/main/java/com/vaadin/server/VaadinSession.java +++ b/server/src/main/java/com/vaadin/server/VaadinSession.java @@ -85,7 +85,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { private final Map<Class<?>, CurrentInstance> instances = CurrentInstance .getInstances(true); private final VaadinSession session; - private Runnable runnable; + private final Runnable runnable; /** * Creates an instance for the given runnable diff --git a/server/src/main/java/com/vaadin/server/communication/AtmospherePushConnection.java b/server/src/main/java/com/vaadin/server/communication/AtmospherePushConnection.java index 60ab1d0651..1189ff6023 100644 --- a/server/src/main/java/com/vaadin/server/communication/AtmospherePushConnection.java +++ b/server/src/main/java/com/vaadin/server/communication/AtmospherePushConnection.java @@ -131,7 +131,7 @@ public class AtmospherePushConnection implements PushConnection { CONNECTED; } - private UI ui; + private final UI ui; private transient State state = State.DISCONNECTED; private transient AtmosphereResource resource; private transient FragmentedMessage incomingMessage; diff --git a/server/src/main/java/com/vaadin/server/communication/JSR356WebsocketInitializer.java b/server/src/main/java/com/vaadin/server/communication/JSR356WebsocketInitializer.java index 95b796a2c7..2119de6f37 100644 --- a/server/src/main/java/com/vaadin/server/communication/JSR356WebsocketInitializer.java +++ b/server/src/main/java/com/vaadin/server/communication/JSR356WebsocketInitializer.java @@ -65,8 +65,8 @@ public class JSR356WebsocketInitializer implements ServletContextListener { */ public static class FakeServletConfig implements ServletConfig { - private ServletRegistration servletRegistration; - private ServletContext servletContext; + private final ServletRegistration servletRegistration; + private final ServletContext servletContext; public FakeServletConfig(ServletRegistration servletRegistration, ServletContext servletContext) { diff --git a/server/src/main/java/com/vaadin/server/communication/PushHandler.java b/server/src/main/java/com/vaadin/server/communication/PushHandler.java index 5423226e6a..75a5c9d94f 100644 --- a/server/src/main/java/com/vaadin/server/communication/PushHandler.java +++ b/server/src/main/java/com/vaadin/server/communication/PushHandler.java @@ -156,7 +156,7 @@ public class PushHandler { } }; - private VaadinServletService service; + private final VaadinServletService service; public PushHandler(VaadinServletService service) { this.service = service; diff --git a/server/src/main/java/com/vaadin/server/communication/UidlRequestHandler.java b/server/src/main/java/com/vaadin/server/communication/UidlRequestHandler.java index 0f5ce37fa9..6afb6434a4 100644 --- a/server/src/main/java/com/vaadin/server/communication/UidlRequestHandler.java +++ b/server/src/main/java/com/vaadin/server/communication/UidlRequestHandler.java @@ -51,7 +51,7 @@ public class UidlRequestHandler extends SynchronizedRequestHandler public static final String UIDL_PATH = "UIDL/"; - private ServerRpcHandler rpcHandler; + private final ServerRpcHandler rpcHandler; public UidlRequestHandler() { rpcHandler = createRpcHandler(); diff --git a/server/src/main/java/com/vaadin/server/data/BackEndDataSource.java b/server/src/main/java/com/vaadin/server/data/BackEndDataSource.java index 2eedeb6839..3ca31de15a 100644 --- a/server/src/main/java/com/vaadin/server/data/BackEndDataSource.java +++ b/server/src/main/java/com/vaadin/server/data/BackEndDataSource.java @@ -30,8 +30,8 @@ import com.vaadin.server.SerializableFunction; */ public class BackEndDataSource<T> extends AbstractDataSource<T> { - private SerializableFunction<Query, Stream<T>> request; - private SerializableFunction<Query, Integer> sizeCallback; + private final SerializableFunction<Query, Stream<T>> request; + private final SerializableFunction<Query, Integer> sizeCallback; /** * Constructs a new DataSource to request data from an arbitrary back end diff --git a/server/src/main/java/com/vaadin/server/data/DataCommunicator.java b/server/src/main/java/com/vaadin/server/data/DataCommunicator.java index a0ce859892..24bb464722 100644 --- a/server/src/main/java/com/vaadin/server/data/DataCommunicator.java +++ b/server/src/main/java/com/vaadin/server/data/DataCommunicator.java @@ -177,11 +177,11 @@ public class DataCommunicator<T> extends AbstractExtension { } } - private Collection<DataGenerator<T>> generators = new LinkedHashSet<>(); - private ActiveDataHandler handler = new ActiveDataHandler(); + private final Collection<DataGenerator<T>> generators = new LinkedHashSet<>(); + private final ActiveDataHandler handler = new ActiveDataHandler(); private DataSource<T> dataSource = DataSource.create(); - private DataKeyMapper<T> keyMapper; + private final DataKeyMapper<T> keyMapper; private boolean reset = false; private final Set<T> updatedData = new HashSet<>(); @@ -189,8 +189,8 @@ public class DataCommunicator<T> extends AbstractExtension { private Comparator<T> inMemorySorting; private SerializablePredicate<T> inMemoryFilter; - private List<SortOrder<String>> backEndSorting = new ArrayList<>(); - private DataCommunicatorClientRpc rpc; + private final List<SortOrder<String>> backEndSorting = new ArrayList<>(); + private final DataCommunicatorClientRpc rpc; public DataCommunicator() { addDataGenerator(handler); diff --git a/server/src/main/java/com/vaadin/server/widgetsetutils/ClassPathExplorer.java b/server/src/main/java/com/vaadin/server/widgetsetutils/ClassPathExplorer.java index b5e377fffc..7e7539b865 100644 --- a/server/src/main/java/com/vaadin/server/widgetsetutils/ClassPathExplorer.java +++ b/server/src/main/java/com/vaadin/server/widgetsetutils/ClassPathExplorer.java @@ -98,14 +98,14 @@ public class ClassPathExplorer { * entries that could include widgets/widgetsets are listed (primarily * directories, Vaadin JARs and add-on JARs). */ - private static List<String> rawClasspathEntries = getRawClasspathEntries(); + private static final List<String> rawClasspathEntries = getRawClasspathEntries(); /** * Map from identifiers (either a package name preceded by the path and a * slash, or a URL for a JAR file) to the corresponding URLs. This is * constructed from the class path. */ - private static Map<String, URL> classpathLocations = getClasspathLocations( + private static final Map<String, URL> classpathLocations = getClasspathLocations( rawClasspathEntries); private static boolean debug = false; diff --git a/server/src/main/java/com/vaadin/ui/AbsoluteLayout.java b/server/src/main/java/com/vaadin/ui/AbsoluteLayout.java index e968568a09..49d020d32f 100644 --- a/server/src/main/java/com/vaadin/ui/AbsoluteLayout.java +++ b/server/src/main/java/com/vaadin/ui/AbsoluteLayout.java @@ -55,12 +55,11 @@ public class AbsoluteLayout extends AbstractLayout private static final String ATTR_Z_INDEX = ":z-index"; private final AbsoluteLayoutServerRpc rpc = (MouseEventDetails mouseDetails, - Connector clickedConnector) -> { - fireEvent(LayoutClickEvent.createEvent(AbsoluteLayout.this, - mouseDetails, clickedConnector)); - }; + Connector clickedConnector) -> fireEvent( + LayoutClickEvent.createEvent(AbsoluteLayout.this, + mouseDetails, clickedConnector)); // Maps each component to a position - private LinkedHashMap<Component, ComponentPosition> componentToCoordinates = new LinkedHashMap<>(); + private final LinkedHashMap<Component, ComponentPosition> componentToCoordinates = new LinkedHashMap<>(); /** * Creates an AbsoluteLayout with full size. diff --git a/server/src/main/java/com/vaadin/ui/AbstractColorPicker.java b/server/src/main/java/com/vaadin/ui/AbstractColorPicker.java index 7f79cecf55..7a40798815 100644 --- a/server/src/main/java/com/vaadin/ui/AbstractColorPicker.java +++ b/server/src/main/java/com/vaadin/ui/AbstractColorPicker.java @@ -75,7 +75,7 @@ public abstract class AbstractColorPicker extends AbstractField<Color> { /** A simple popup with only the swatches (palette) tab. */ POPUP_SIMPLE("simple"); - private String style; + private final String style; PopupStyle(String styleName) { style = styleName; diff --git a/server/src/main/java/com/vaadin/ui/AbstractJavaScriptComponent.java b/server/src/main/java/com/vaadin/ui/AbstractJavaScriptComponent.java index 580754be01..8e70e9cb03 100644 --- a/server/src/main/java/com/vaadin/ui/AbstractJavaScriptComponent.java +++ b/server/src/main/java/com/vaadin/ui/AbstractJavaScriptComponent.java @@ -149,7 +149,7 @@ import elemental.json.JsonValue; * @since 7.0.0 */ public abstract class AbstractJavaScriptComponent extends AbstractComponent { - private JavaScriptCallbackHelper callbackHelper = new JavaScriptCallbackHelper( + private final JavaScriptCallbackHelper callbackHelper = new JavaScriptCallbackHelper( this); @Override diff --git a/server/src/main/java/com/vaadin/ui/AbstractOrderedLayout.java b/server/src/main/java/com/vaadin/ui/AbstractOrderedLayout.java index 6c995611fb..6858a18999 100644 --- a/server/src/main/java/com/vaadin/ui/AbstractOrderedLayout.java +++ b/server/src/main/java/com/vaadin/ui/AbstractOrderedLayout.java @@ -45,10 +45,10 @@ public abstract class AbstractOrderedLayout extends AbstractLayout LayoutClickNotifier, Layout.MarginHandler { private final AbstractOrderedLayoutServerRpc rpc = ( - MouseEventDetails mouseDetails, Connector clickedConnector) -> { - fireEvent(LayoutClickEvent.createEvent(AbstractOrderedLayout.this, - mouseDetails, clickedConnector)); - }; + MouseEventDetails mouseDetails, + Connector clickedConnector) -> fireEvent( + LayoutClickEvent.createEvent(AbstractOrderedLayout.this, + mouseDetails, clickedConnector)); public static final Alignment ALIGNMENT_DEFAULT = Alignment.TOP_LEFT; diff --git a/server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java b/server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java index 73bedc8470..e7a66cebe5 100644 --- a/server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java +++ b/server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java @@ -54,7 +54,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { private Unit posMinUnit; private Unit posMaxUnit; - private AbstractSplitPanelRpc rpc = new AbstractSplitPanelRpc() { + private final AbstractSplitPanelRpc rpc = new AbstractSplitPanelRpc() { @Override public void splitterClick(MouseEventDetails mouseDetails) { diff --git a/server/src/main/java/com/vaadin/ui/ConnectorTracker.java b/server/src/main/java/com/vaadin/ui/ConnectorTracker.java index fd2c0029d1..2ba6f5e895 100644 --- a/server/src/main/java/com/vaadin/ui/ConnectorTracker.java +++ b/server/src/main/java/com/vaadin/ui/ConnectorTracker.java @@ -68,8 +68,8 @@ import elemental.json.JsonObject; public class ConnectorTracker implements Serializable { private final HashMap<String, ClientConnector> connectorIdToConnector = new HashMap<>(); - private Set<ClientConnector> dirtyConnectors = new HashSet<>(); - private Set<ClientConnector> uninitializedConnectors = new HashSet<>(); + private final Set<ClientConnector> dirtyConnectors = new HashSet<>(); + private final Set<ClientConnector> uninitializedConnectors = new HashSet<>(); /** * Connectors that have been unregistered and should be cleaned up the next @@ -80,7 +80,7 @@ public class ConnectorTracker implements Serializable { private boolean writingResponse = false; - private UI uI; + private final UI uI; private transient Map<ClientConnector, JsonObject> diffStates = new HashMap<>(); /** Maps connectorIds to a map of named StreamVariables */ @@ -96,7 +96,7 @@ public class ConnectorTracker implements Serializable { * @see #getCurrentSyncId() * @see #cleanConcurrentlyRemovedConnectorIds(long) */ - private TreeMap<Integer, Set<String>> syncIdToUnregisteredConnectorIds = new TreeMap<>(); + private final TreeMap<Integer, Set<String>> syncIdToUnregisteredConnectorIds = new TreeMap<>(); /** * Gets a logger for this class diff --git a/server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java b/server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java index 7f2e558220..4b9a7afbfb 100644 --- a/server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java +++ b/server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java @@ -351,7 +351,7 @@ public class DragAndDropWrapper extends CustomComponent final class ProxyReceiver implements StreamVariable { - private String id; + private final String id; private Html5File file; public ProxyReceiver(String id, Html5File file) { @@ -425,7 +425,7 @@ public class DragAndDropWrapper extends CustomComponent class ReceivingEventWrapper implements StreamingErrorEvent, StreamingEndEvent, StreamingStartEvent, StreamingProgressEvent { - private StreamingEvent wrappedEvent; + private final StreamingEvent wrappedEvent; ReceivingEventWrapper(StreamingEvent e) { wrappedEvent = e; diff --git a/server/src/main/java/com/vaadin/ui/Grid.java b/server/src/main/java/com/vaadin/ui/Grid.java index b738b71323..63c8fe3e6f 100644 --- a/server/src/main/java/com/vaadin/ui/Grid.java +++ b/server/src/main/java/com/vaadin/ui/Grid.java @@ -650,8 +650,8 @@ public class Grid<T> extends AbstractSingleSelect<T> implements HasComponents { */ public static class DetailsManager<T> extends AbstractGridExtension<T> { - private Set<T> visibleDetails = new HashSet<>(); - private Map<T, Component> components = new HashMap<>(); + private final Set<T> visibleDetails = new HashSet<>(); + private final Map<T, Component> components = new HashMap<>(); private DetailsGenerator<T> generator; /** @@ -1821,17 +1821,17 @@ public class Grid<T> extends AbstractSingleSelect<T> implements HasComponents { } }; - private Set<Column<T, ?>> columnSet = new LinkedHashSet<>(); - private Map<String, Column<T, ?>> columnKeys = new HashMap<>(); + private final Set<Column<T, ?>> columnSet = new LinkedHashSet<>(); + private final Map<String, Column<T, ?>> columnKeys = new HashMap<>(); - private List<SortOrder<Column<T, ?>>> sortOrder = new ArrayList<>(); - private DetailsManager<T> detailsManager; - private Set<Component> extensionComponents = new HashSet<>(); + private final List<SortOrder<Column<T, ?>>> sortOrder = new ArrayList<>(); + private final DetailsManager<T> detailsManager; + private final Set<Component> extensionComponents = new HashSet<>(); private StyleGenerator<T> styleGenerator = item -> null; private DescriptionGenerator<T> descriptionGenerator; - private Header header = new HeaderImpl(); - private Footer footer = new FooterImpl(); + private final Header header = new HeaderImpl(); + private final Footer footer = new FooterImpl(); private int counter = 0; diff --git a/server/src/main/java/com/vaadin/ui/Html5File.java b/server/src/main/java/com/vaadin/ui/Html5File.java index b3fcdb826f..b4434e75c9 100644 --- a/server/src/main/java/com/vaadin/ui/Html5File.java +++ b/server/src/main/java/com/vaadin/ui/Html5File.java @@ -27,10 +27,10 @@ import com.vaadin.server.StreamVariable; */ public class Html5File implements Serializable { - private String name; - private long size; + private final String name; + private final long size; private StreamVariable streamVariable; - private String type; + private final String type; Html5File(String name, long size, String mimeType) { this.name = name; diff --git a/server/src/main/java/com/vaadin/ui/LoadingIndicatorConfiguration.java b/server/src/main/java/com/vaadin/ui/LoadingIndicatorConfiguration.java index 32b9356d76..bd56036aee 100644 --- a/server/src/main/java/com/vaadin/ui/LoadingIndicatorConfiguration.java +++ b/server/src/main/java/com/vaadin/ui/LoadingIndicatorConfiguration.java @@ -83,7 +83,7 @@ public interface LoadingIndicatorConfiguration extends Serializable { class LoadingIndicatorConfigurationImpl implements LoadingIndicatorConfiguration { - private UI ui; + private final UI ui; public LoadingIndicatorConfigurationImpl(UI ui) { this.ui = ui; diff --git a/server/src/main/java/com/vaadin/ui/LoginForm.java b/server/src/main/java/com/vaadin/ui/LoginForm.java index 74432d001a..9acd0735b1 100644 --- a/server/src/main/java/com/vaadin/ui/LoginForm.java +++ b/server/src/main/java/com/vaadin/ui/LoginForm.java @@ -62,7 +62,7 @@ public class LoginForm extends AbstractSingleComponentContainer { */ public static class LoginEvent extends Component.Event { - private Map<String, String> params; + private final Map<String, String> params; /** * Creates a login event using the given source and the given diff --git a/server/src/main/java/com/vaadin/ui/Notification.java b/server/src/main/java/com/vaadin/ui/Notification.java index 536598448b..7ee78fb807 100644 --- a/server/src/main/java/com/vaadin/ui/Notification.java +++ b/server/src/main/java/com/vaadin/ui/Notification.java @@ -70,7 +70,7 @@ public class Notification implements Serializable { */ ASSISTIVE_NOTIFICATION("assistive"); - private String style; + private final String style; Type(String style) { this.style = style; diff --git a/server/src/main/java/com/vaadin/ui/NotificationConfiguration.java b/server/src/main/java/com/vaadin/ui/NotificationConfiguration.java index f7591af13c..0062bb969f 100644 --- a/server/src/main/java/com/vaadin/ui/NotificationConfiguration.java +++ b/server/src/main/java/com/vaadin/ui/NotificationConfiguration.java @@ -118,7 +118,7 @@ public interface NotificationConfiguration extends Serializable { class NotificationConfigurationImpl implements NotificationConfiguration { - private UI ui; + private final UI ui; public NotificationConfigurationImpl(UI ui) { this.ui = ui; diff --git a/server/src/main/java/com/vaadin/ui/PushConfiguration.java b/server/src/main/java/com/vaadin/ui/PushConfiguration.java index cad96a5952..bb722ec2d2 100644 --- a/server/src/main/java/com/vaadin/ui/PushConfiguration.java +++ b/server/src/main/java/com/vaadin/ui/PushConfiguration.java @@ -165,7 +165,7 @@ public interface PushConfiguration extends Serializable { } class PushConfigurationImpl implements PushConfiguration { - private UI ui; + private final UI ui; public PushConfigurationImpl(UI ui) { this.ui = ui; diff --git a/server/src/main/java/com/vaadin/ui/ReconnectDialogConfiguration.java b/server/src/main/java/com/vaadin/ui/ReconnectDialogConfiguration.java index d4df9fdf28..8a36de3510 100644 --- a/server/src/main/java/com/vaadin/ui/ReconnectDialogConfiguration.java +++ b/server/src/main/java/com/vaadin/ui/ReconnectDialogConfiguration.java @@ -132,7 +132,7 @@ public interface ReconnectDialogConfiguration extends Serializable { } class ReconnectDialogConfigurationImpl implements ReconnectDialogConfiguration { - private UI ui; + private final UI ui; public ReconnectDialogConfigurationImpl(UI ui) { this.ui = ui; diff --git a/server/src/main/java/com/vaadin/ui/TabSheet.java b/server/src/main/java/com/vaadin/ui/TabSheet.java index 5623166357..7ad40c2771 100644 --- a/server/src/main/java/com/vaadin/ui/TabSheet.java +++ b/server/src/main/java/com/vaadin/ui/TabSheet.java @@ -1101,7 +1101,7 @@ public class TabSheet extends AbstractComponentContainer */ public class TabSheetTabImpl implements Tab { - private TabState tabState; + private final TabState tabState; private Focusable defaultFocus; diff --git a/server/src/main/java/com/vaadin/ui/TooltipConfiguration.java b/server/src/main/java/com/vaadin/ui/TooltipConfiguration.java index b5af10961b..1bf9fd7b81 100644 --- a/server/src/main/java/com/vaadin/ui/TooltipConfiguration.java +++ b/server/src/main/java/com/vaadin/ui/TooltipConfiguration.java @@ -123,7 +123,7 @@ public interface TooltipConfiguration extends Serializable { } class TooltipConfigurationImpl implements TooltipConfiguration { - private UI ui; + private final UI ui; public TooltipConfigurationImpl(UI ui) { this.ui = ui; diff --git a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerHistory.java b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerHistory.java index a32378aeaf..ae1c304fd2 100644 --- a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerHistory.java +++ b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerHistory.java @@ -40,7 +40,7 @@ public class ColorPickerHistory extends CustomField<Color> { private static final int COLUMNS = 15; /** Temporary color history for when the component is detached. */ - private ArrayBlockingQueue<Color> tempHistory = new ArrayBlockingQueue<>( + private final ArrayBlockingQueue<Color> tempHistory = new ArrayBlockingQueue<>( ROWS * COLUMNS); @Override diff --git a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerSelect.java b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerSelect.java index 20d68da0fa..ec200082ab 100644 --- a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerSelect.java +++ b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerSelect.java @@ -38,7 +38,7 @@ public class ColorPickerSelect extends CustomField<Color> { ALL("All colors"), RED("Red colors"), GREEN("Green colors"), BLUE( "Blue colors"); - private String caption; + private final String caption; ColorRange(String caption) { this.caption = caption; diff --git a/server/src/main/java/com/vaadin/ui/components/grid/StaticSection.java b/server/src/main/java/com/vaadin/ui/components/grid/StaticSection.java index eb02be2bbc..678ab2a935 100644 --- a/server/src/main/java/com/vaadin/ui/components/grid/StaticSection.java +++ b/server/src/main/java/com/vaadin/ui/components/grid/StaticSection.java @@ -150,8 +150,8 @@ public abstract class StaticSection<ROW extends StaticSection.StaticRow<?>> */ abstract static class StaticCell implements Serializable { - private CellState cellState = new CellState(); - private StaticRow<?> row; + private final CellState cellState = new CellState(); + private final StaticRow<?> row; protected StaticCell(StaticRow<?> row) { this.row = row; 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 00fb32392c..5b0968bae6 100644 --- a/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java +++ b/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java @@ -430,7 +430,7 @@ public class DesignAttributeHandler implements Serializable { * @author Vaadin Ltd */ private static class AttributeCacheEntry implements Serializable { - private Map<String, Method[]> accessMethods = new ConcurrentHashMap<>(); + private final Map<String, Method[]> accessMethods = new ConcurrentHashMap<>(); private void addAttribute(String attribute, Method getter, Method setter) { diff --git a/server/src/main/java/com/vaadin/ui/declarative/DesignContext.java b/server/src/main/java/com/vaadin/ui/declarative/DesignContext.java index c8e794c46a..761c7edd04 100644 --- a/server/src/main/java/com/vaadin/ui/declarative/DesignContext.java +++ b/server/src/main/java/com/vaadin/ui/declarative/DesignContext.java @@ -686,9 +686,9 @@ public class DesignContext implements Serializable { * @author Vaadin Ltd */ public class ComponentCreatedEvent implements Serializable { - private String localId; - private Component component; - private DesignContext context; + private final String localId; + private final Component component; + private final DesignContext context; /** * Creates a new instance of ComponentCreatedEvent diff --git a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignEnumConverter.java b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignEnumConverter.java index 93ccee3f37..a32c68998f 100644 --- a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignEnumConverter.java +++ b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignEnumConverter.java @@ -33,7 +33,7 @@ import com.vaadin.ui.declarative.DesignAttributeHandler; public class DesignEnumConverter<T extends Enum> implements Converter<String, T> { - private Class<T> type; + private final Class<T> type; /** * Creates a converter for the given enum type. diff --git a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignResourceConverter.java b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignResourceConverter.java index ef6e10ef5c..c03d3750d1 100644 --- a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignResourceConverter.java +++ b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignResourceConverter.java @@ -170,7 +170,7 @@ public class DesignResourceConverter implements Converter<String, Resource> { return ((ExternalResource) value).getURL(); } - private static Map<Class<? extends Resource>, ResourceConverterByProtocol> typeToConverter = new HashMap<>(); + private static final Map<Class<? extends Resource>, ResourceConverterByProtocol> typeToConverter = new HashMap<>(); static { typeToConverter.put(ExternalResource.class, HTTP); // ^ any of non-specialized would actually work diff --git a/server/src/main/java/com/vaadin/ui/renderers/ClickableRenderer.java b/server/src/main/java/com/vaadin/ui/renderers/ClickableRenderer.java index 3073517b65..8686c391c5 100644 --- a/server/src/main/java/com/vaadin/ui/renderers/ClickableRenderer.java +++ b/server/src/main/java/com/vaadin/ui/renderers/ClickableRenderer.java @@ -70,8 +70,8 @@ public abstract class ClickableRenderer<T, V> extends AbstractRenderer<T, V> { */ public static class RendererClickEvent<T> extends ClickEvent { - private T item; - private Column column; + private final T item; + private final Column column; protected RendererClickEvent(Grid<T> source, T item, Column column, MouseEventDetails mouseEventDetails) { diff --git a/server/src/main/java/com/vaadin/util/CurrentInstance.java b/server/src/main/java/com/vaadin/util/CurrentInstance.java index f8d6af2a4c..43b158a4ff 100644 --- a/server/src/main/java/com/vaadin/util/CurrentInstance.java +++ b/server/src/main/java/com/vaadin/util/CurrentInstance.java @@ -64,7 +64,7 @@ public class CurrentInstance implements Serializable { private final WeakReference<Object> instance; private final boolean inheritable; - private static InheritableThreadLocal<Map<Class<?>, CurrentInstance>> instances = new InheritableThreadLocal<Map<Class<?>, CurrentInstance>>() { + private static final InheritableThreadLocal<Map<Class<?>, CurrentInstance>> instances = new InheritableThreadLocal<Map<Class<?>, CurrentInstance>>() { @Override protected Map<Class<?>, CurrentInstance> childValue( Map<Class<?>, CurrentInstance> parentValue) { diff --git a/server/src/main/java/com/vaadin/util/FileTypeResolver.java b/server/src/main/java/com/vaadin/util/FileTypeResolver.java index 4df2785ce8..4cbac69df5 100644 --- a/server/src/main/java/com/vaadin/util/FileTypeResolver.java +++ b/server/src/main/java/com/vaadin/util/FileTypeResolver.java @@ -53,7 +53,7 @@ public class FileTypeResolver implements Serializable { /** * Initial file extension to mime-type mapping. */ - static private String initialExtToMIMEMap = "application/cu-seeme csm cu," + private static final String initialExtToMIMEMap = "application/cu-seeme csm cu," + "application/dsptype tsp," + "application/futuresplash spl," + "application/mac-binhex40 hqx," diff --git a/server/src/main/java/com/vaadin/util/SerializerHelper.java b/server/src/main/java/com/vaadin/util/SerializerHelper.java index 5b6b06c0c1..41ef150d51 100644 --- a/server/src/main/java/com/vaadin/util/SerializerHelper.java +++ b/server/src/main/java/com/vaadin/util/SerializerHelper.java @@ -105,7 +105,7 @@ public class SerializerHelper { * List of primitive classes. Google App Engine has problems * serializing/deserializing these (#3064). */ - private static Class<?>[] primitiveClasses = new Class<?>[] { byte.class, + private static final Class<?>[] primitiveClasses = new Class<?>[] { byte.class, short.class, int.class, long.class, float.class, double.class, boolean.class, char.class }; |