private static boolean isSharedFlyweight(Object obj) {
        if (obj == null) {
            return true;
        }
        if (obj == Boolean.TRUE || obj == Boolean.FALSE) {
            return true;
        }
        if (/* obj == Locale.ROOT || *//* Java 6 */
        obj == Locale.ENGLISH || obj == Locale.FRENCH || obj == Locale.GERMAN || obj == Locale.ITALIAN
                || obj == Locale.JAPANESE || obj == Locale.KOREAN || obj == Locale.CHINESE
                || obj == Locale.SIMPLIFIED_CHINESE || obj == Locale.TRADITIONAL_CHINESE || obj == Locale.FRANCE
                || obj == Locale.GERMANY || obj == Locale.ITALY || obj == Locale.JAPAN || obj == Locale.KOREA
                || obj == Locale.CHINA || obj == Locale.PRC || obj == Locale.TAIWAN || obj == Locale.UK
                || obj == Locale.US || obj == Locale.CANADA || obj == Locale.CANADA_FRENCH) {
            return true;
        }
        if (obj == Collections.EMPTY_SET || obj == Collections.EMPTY_LIST || obj == Collections.EMPTY_MAP) {
            return true;
        }
        if (obj == BigInteger.ZERO || obj == BigInteger.ONE) {
            return true;
        }
        if (obj == System.in || obj == System.out || obj == System.err) {
            return true;
        }
        if (obj == String.CASE_INSENSITIVE_ORDER) {
            return true;
        }
        if (obj == JarFile.MANIFEST_NAME) {
            return true;
        }
        return false;
    }
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5012949 Implementation note: we can compare classes with ==
since they will always be loaded from the same ClassLoader (they are "low" in the hierarchy)
shared/common/src/main/java/com/alibaba/otter/shared/common/utils/sizeof/ObjectProfiler.java