Patch: FYI: new test case

Eric Blake ebb9@email.byu.edu
Sat Nov 2 17:10:00 GMT 2002


One problem...

Tom Tromey wrote:
> I'm checking this in.
> 
> Index: ChangeLog
> from  Tom Tromey  <tromey@redhat.com>
> 
> 	* libjava.lang/initexc.java: New file.
> 	* libjava.lang/initexc.out: New file.
> 
> +    static
> +    {
> +      throw new NullPointerException("nope");
> +    }

Static initializers must be able to complete normally. This should be a 
compile failure.  Should I open a PR?

For this test to work, rewrite it as

static
{
   if (true)
     throw new NullPointerException("nope");
}

-- 
This signature intentionally left boring.

Eric Blake             ebb9@email.byu.edu
   BYU student, free software programmer




More information about the Java-patches mailing list