From 531320c5051b7f72c9d96c7826b5cd4f9dcaae67 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Mon, 8 Jan 2018 13:05:26 +0200 Subject: [PATCH] Tweak date style API (#10493) * Disallow some `null` arguments * Return an unmodifiable map from getDateStyles(). This helps the developer understand that changes to the returned map are not automatically applied to the component. * Remove redundant `@link` markup from `@see` in the javadocs. --- .../java/com/vaadin/ui/AbstractDateField.java | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/server/src/main/java/com/vaadin/ui/AbstractDateField.java b/server/src/main/java/com/vaadin/ui/AbstractDateField.java index 1198e04d66..110223c628 100644 --- a/server/src/main/java/com/vaadin/ui/AbstractDateField.java +++ b/server/src/main/java/com/vaadin/ui/AbstractDateField.java @@ -23,6 +23,7 @@ import java.time.ZoneId; import java.time.temporal.Temporal; import java.time.temporal.TemporalAdjuster; import java.util.Calendar; +import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.Locale; @@ -822,7 +823,7 @@ public abstract class AbstractDateField * * @param date - * which date cell to modify + * which date cell to modify, not {@code null} * @param styleName * the custom style name(s) for given date, {@code null} to clear * custom style name(s) @@ -830,12 +831,11 @@ public abstract class AbstractDateField getDateStyles() { @@ -872,6 +873,6 @@ public abstract class AbstractDateField