Sebastian Sickelmann sebastian.sickelmann at gmx.de
Sun Sep 6 18:47:15 UTC 2015


i am looking through same bug-reports for some low hanging fruits and I
found JDK-7198513[1] ,
which seems to be a reporting failure. The Formatter works as excepted.
The reported made a
small mistake and used the empty ObjectArray without any case, so it is
used as the var-arg
parameter (with zero elements).

I think this bug can be closed.

I tested the following on 1.6.0_35, 1.7.0_79 and 1.8.0_45 and it always
produces the same
expected result.

public class FormatterTest {

    public static void main(String[] args) {
        System.out.println(String.format("%d,%b", 42, new Object[] {}));
        System.out.println(String.format("%b", (Object) new Object[] {}));
        try {
            System.out.println(String.format("%b", new Object[] {}));
            System.out.println("There is something rotten in state of
        } catch (MissingFormatArgumentException e) {
            System.out.println("Works as expected");

Works as expected

What is the preferred workflow for such a bug-database cleanup? Is it
through the mailing list?

-- Sebastian

[1] https://bugs.openjdk.java.net/browse/JDK-7198513

More information about the jdk9-dev mailing list