Here you can find the source of areEqual(Object o1, Object o2)
public static boolean areEqual(Object o1, Object o2)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from w w w.j av a2s .c o m*/ * Checks whether two objects are equal. This is null-safe and considers null and empty string to be equal */ public static boolean areEqual(Object o1, Object o2) { Object obj1 = nvl(o1, ""); Object obj2 = nvl(o2, ""); return obj1.equals(obj2); } /** * Returns the passed object, if not null, or replacement otherwise */ public static <T extends Object> T nvl(T o, T replacement) { return (isNull(o) ? replacement : o); } /** * Returns true if object is null or empty String */ public static boolean isNull(Object o) { return o == null || o.equals(""); } }