RFR JDK-8039390: Unexpected behaviour of String.format with null arguments
Roger.Riggs at Oracle.com
Tue Aug 11 15:12:12 UTC 2015
The spec clarifications and the new test look fine.
On 8/7/15 1:24 PM, Xueming Shen wrote:
> Please help review fix for
> issue: https://bugs.openjdk.java.net/browse/JDK-8039390
> webrev: http://cr.openjdk.java.net/~sherman/8039390
> The j.u.Formatter implementation outputs "null/Null" for all conversions
> if the argument is null (except 'b'/'B', in which the result is
> However the API doc only explicitly specifies this behavior for 'b',
> 'h' and
> 's'. With the "Unless otherwise specified, passing a null argument to any
> method or constructor in this class will cause a NullPointerException to
> be thrown" at the bottom of the spec, it is confusing which one should be
> the expected behavior.
> The proposed change here is to add explicit wording to cover all
> (Will go through CCC is approved here).
More information about the core-libs-dev