diff options
author | Leif Åstrand <leif@vaadin.com> | 2013-04-05 18:32:50 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2013-04-10 14:47:18 +0300 |
commit | 2700cd2fe6c48b29478f1b8e14fde1d405a6ab7d (patch) | |
tree | fdef2375cc28a6c9db4501cd4535152434c97d10 /client | |
parent | fd4f1d280e8eb6a453868db01b8accc1e7b8d0b1 (diff) | |
download | vaadin-framework-2700cd2fe6c48b29478f1b8e14fde1d405a6ab7d.tar.gz vaadin-framework-2700cd2fe6c48b29478f1b8e14fde1d405a6ab7d.zip |
Added SharedUtil for helpers shared by client and server
Change-Id: Ie289e8eefd962631a43f35dbb47fa192fcf60abf
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/Util.java | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/client/src/com/vaadin/client/Util.java b/client/src/com/vaadin/client/Util.java index 9810156bcc..8972670232 100644 --- a/client/src/com/vaadin/client/Util.java +++ b/client/src/com/vaadin/client/Util.java @@ -48,6 +48,7 @@ import com.vaadin.shared.AbstractComponentState; import com.vaadin.shared.ApplicationConstants; import com.vaadin.shared.communication.MethodInvocation; import com.vaadin.shared.ui.ComponentStateUtil; +import com.vaadin.shared.util.SharedUtil; public class Util { @@ -550,12 +551,21 @@ public class Util { } } + /** + * Checks if a and b are equals using {@link #equals(Object)}. Handles null + * values as well. Does not ensure that objects are of the same type. + * Assumes that the first object's equals method handle equals properly. + * + * @param a + * The first value to compare + * @param b + * The second value to compare + * @return + * @deprecated As of 7.1 use {@link SharedUtil#equals(Object)} instead + */ + @Deprecated public static boolean equals(Object a, Object b) { - if (a == null) { - return b == null; - } - - return a.equals(b); + return SharedUtil.equals(a, b); } public static void updateRelativeChildrenAndSendSizeUpdateEvent( |