--- old/src/java.base/share/classes/java/lang/Class.java 2018-12-07 12:57:48.000000000 -0800 +++ new/src/java.base/share/classes/java/lang/Class.java 2018-12-07 12:57:48.000000000 -0800 @@ -190,7 +190,7 @@ public String toString() { return (isValue() ? "value " : "") + (isInterface() ? "interface " : (isPrimitive() ? "" : "class ")) - + getName(); + + getName() + (isValue() && isBoxType() ? "/box" : ""); } /** @@ -523,7 +523,7 @@ * @return the box type of this class if this class is a value class; * otherwise, this class. */ - public Class asBoxType() { + public Class asBoxType() { return isValue() ? boxType : this; } @@ -540,7 +540,7 @@ * @return the unbox value type of this class if this class is a value class; * otherwise, {@code null}. */ - public Class asValueType() { + public Class asValueType() { return isValue() ? valueType : null; } @@ -552,8 +552,8 @@ } // set by VM if this class is a value type - private transient Class boxType; - private transient Class valueType; + private transient Class boxType; + private transient Class valueType; /** * Creates a new instance of the class represented by this {@code Class}