diff options
author | Ilia Motornyi <elmot@vaadin.com> | 2016-05-04 08:31:22 +0000 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2016-05-04 09:54:02 +0000 |
commit | ef306c16f5a9cb8edae44fc8ce47cf3dc1964625 (patch) | |
tree | b357ee318075a9c6ba9d2ef29a3f82e73a527d51 /server | |
parent | f2b013e8d6908c6605acb2b7e89a400a6a0f0391 (diff) | |
download | vaadin-framework-ef306c16f5a9cb8edae44fc8ce47cf3dc1964625.tar.gz vaadin-framework-ef306c16f5a9cb8edae44fc8ce47cf3dc1964625.zip |
Revert "Better default for nullRepresentation (#13221, #12877)"feature/standard-sass
This reverts commit 85870ccd9f93cebd839d22d2bd63ec817bb90a3d.
Change-Id: Ifb9bbac0ee36e71d2251c31b936a12f1f3ea7315
Diffstat (limited to 'server')
-rw-r--r-- | server/src/main/java/com/vaadin/server/DefaultDeploymentConfiguration.java | 12 | ||||
-rw-r--r-- | server/src/main/java/com/vaadin/ui/AbstractTextField.java | 37 |
2 files changed, 1 insertions, 48 deletions
diff --git a/server/src/main/java/com/vaadin/server/DefaultDeploymentConfiguration.java b/server/src/main/java/com/vaadin/server/DefaultDeploymentConfiguration.java index 677be2e31b..1f22a9e33d 100644 --- a/server/src/main/java/com/vaadin/server/DefaultDeploymentConfiguration.java +++ b/server/src/main/java/com/vaadin/server/DefaultDeploymentConfiguration.java @@ -21,7 +21,6 @@ import java.util.logging.Level; import java.util.logging.Logger; import com.vaadin.shared.communication.PushMode; -import com.vaadin.ui.AbstractTextField; /** * The default implementation of {@link DeploymentConfiguration} based on a base @@ -98,17 +97,6 @@ public class DefaultDeploymentConfiguration extends checkLegacyPropertyToString(); checkSyncIdCheck(); checkSendUrlsAsParameters(); - checkNullRepresentationLegacyMode(); - } - - private void checkNullRepresentationLegacyMode() { - final boolean legacyMode = getApplicationOrSystemProperty( - "com.vaadin.nullrepresentationlegacymode", - Boolean.toString(false)).equals("true"); - if (legacyMode) { - AbstractTextField.setNullRepresentationDefault("null"); - } - } private void checkLegacyPropertyToString() { diff --git a/server/src/main/java/com/vaadin/ui/AbstractTextField.java b/server/src/main/java/com/vaadin/ui/AbstractTextField.java index ce1d6f638d..5fbe60937a 100644 --- a/server/src/main/java/com/vaadin/ui/AbstractTextField.java +++ b/server/src/main/java/com/vaadin/ui/AbstractTextField.java @@ -41,13 +41,10 @@ import com.vaadin.ui.declarative.DesignContext; public abstract class AbstractTextField extends AbstractField<String> implements BlurNotifier, FocusNotifier, TextChangeNotifier, LegacyComponent { - private static String nullRepresentationDefault = ""; - /** * Null representation. */ - private String nullRepresentation = nullRepresentationDefault; - + private String nullRepresentation = "null"; /** * Is setting to null from non-null value allowed by setting with null * representation . @@ -813,36 +810,4 @@ public abstract class AbstractTextField extends AbstractField<String> implements getMaxLength(), def.getMaxLength(), Integer.class); } - /** - * @since 7.6 - * @return the default value used for nullRepresentation - */ - public static String getNullRepresentationDefault() { - return nullRepresentationDefault; - } - - /** - * A static helper to define the default value used for nullRepresentation. - * <p> - * In 7.6 the infamous default value "null" for - * AbstractTextField.nullRepresentation was changed to "", which may cause - * unexpected issues in certain applications that don't tackle null values. - * If there are several places in your application that depend on the old - * default, this method can be used to put new AbstractTextField instances - * into backwards compatibility mode by defining the default value as - * "null". The "legacy mode" can also be forced by setting system property - * "com.vaadin.nullrepresentationlegacymode" (before AbstractTextField class - * is loaded by your class loader). - * - * @since 7.6 - * @param nullRepresentationString - * the value that will be used as a default for - * {@link AbstractTextField#getNullRepresentation()} in new - * instances - */ - public static void setNullRepresentationDefault( - String nullRepresentationString) { - AbstractTextField.nullRepresentationDefault = nullRepresentationString; - } - } |