Expected behavior with -esa

Brandon Passanisi brandon.passanisi at oracle.com
Wed Nov 23 21:57:59 UTC 2011

Looking into the issue more, I had incorrectly assumed that the 
assertion was a pre-condition of the MissingFormatArgumentException 
because of the differing behavior when -esa is used.  After stepping 
through the code, it is actually unrelated and... is still a bug.

On 11/23/2011 1:22 PM, Eamonn McManus wrote:
> Isn't an AssertionError *always* a bug?
> Éamonn
> On 23 November 2011 12:04, Brandon Passanisi
> <brandon.passanisi at oracle.com>  wrote:
>> I'm currently looking at a bug report: http://monaco.sfbay.sun.com/detail.jsf?cr=5066854 which describes an issue where a simple program was run with the option -esa to enable system assertions.  The bug author describes that, in the provided sample code, an AssertionError occurs when the spec says a MissingFormatArgumentException should be thrown.  When running the sample program without the -esa option, a MissingFormatArgumentException is thrown.  It seems to me that it shouldn't be unexpected to see an AssertionError when -esa is used, instead of the MissingFormatArgumentException.  In fact, this behavior appears to not be limited to this particular test case, and can possibly occur with other APIs if an AssertionError is seen before an expected exception.  I was hoping to see some sort of explanation in the evaluation or comments section of the bug report, but the bug report was only updated with references about how the bug was filed too late for a release.  Can someone clarify if this behavior with -esa is actually a bug?
>> Thanks.

More information about the core-libs-dev mailing list