--- old/src/java.base/share/classes/jdk/internal/misc/JavaLangAccess.java 2018-06-20 09:17:33.750351287 -0700 +++ new/src/java.base/share/classes/jdk/internal/misc/JavaLangAccess.java 2018-06-20 09:17:33.349313797 -0700 @@ -30,6 +30,7 @@ import java.lang.reflect.Executable; import java.lang.reflect.Method; import java.net.URI; +import java.nio.charset.CharacterCodingException; import java.nio.charset.Charset; import java.security.AccessControlContext; import java.security.ProtectionDomain; @@ -268,7 +269,7 @@ * @return the newly created string * @throws IllegalArgumentException for malformed or unmappable bytes */ - String newStringNoRepl(byte[] bytes, Charset cs); + String newStringNoRepl(byte[] bytes, Charset cs) throws CharacterCodingException; /** * Encode the given string into a sequence of bytes using the specified Charset. @@ -284,7 +285,7 @@ * @return the encoded bytes * @throws IllegalArgumentException for malformed input or unmappable characters */ - byte[] getBytesNoRepl(String s, Charset cs); + byte[] getBytesNoRepl(String s, Charset cs) throws CharacterCodingException; /** * Returns a new string by decoding from the given utf8 bytes array.