On 01/12/2017 06:11, Joe Wang wrote:
Hi,
Adding convenient methods that take a Charset to several classes that
have already had methods with a Charset/Encoding name as a parameter.
To avoid any impact on compatibility and JCK tests, we've kept the
existing methods virtually untouched except making a reference to the
new ones to encourage the use of these new methods going forward. The
javadocs of the new methods however, may be more complete with details
on handling edge cases / Exceptions.
JBS: https://bugs.openjdk.java.net/browse/JDK-8183743
webrev: http://cr.openjdk.java.net/~joehw/jdk10/8183743/webrev/index.html
I looked through the javadoc for the updated/new methods and it mostly
looks good.
I think URLDecoder.decode methods should have @throws
IllegalArgumentException. I realize it's implementation specific as to
whether IAE is thrown with bad input but given that the RI does throw
IAE then consumers of the API should be prepared for it. The @implNote
can stay and probably should be copied into the legacy decode method too.
One of the new constructors on Scanner needs @since 10.
-Alan