--- old/src/java.base/share/classes/java/lang/String.java 2015-05-28 12:50:43.976664872 +0200 +++ new/src/java.base/share/classes/java/lang/String.java 2015-05-28 12:50:43.919664773 +0200 @@ -113,7 +113,8 @@ */ public final class String - implements java.io.Serializable, Comparable, CharSequence { + implements java.io.Serializable, Comparable, CharSequence, + sun.misc.ConstantLengthCharSequence { /** The value is used for character storage. */ private final char value[]; @@ -789,6 +790,14 @@ } /** + * Returns a character array representing characters of this String. + * It may be shared with the String, so it should not be modified. + */ + char[] getCharsShared() { + return value; + } + + /** * Copies characters from this string into the destination character * array. *