Bug 7176907 - Patches for javac warnings cleanup (text and util) from Adopt OpenJDK

Martijn Verburg martijnverburg at gmail.com
Wed Jun 27 07:58:52 UTC 2012

Hi Kurchi,

> Thanks for updating this. This looks good to me. I guess Stuart will be
> sponsoring the patch.

For his sins he's kindly offered to do so yes :-)

> There are a couple of other switch statements in
>  src/share/classes/java/util/regex/Pattern.java.
> which are not throwing fallthrough warnings (in Netbeans at least),
> although there is fallthrough happening from one case to another. From what
> I notice, only if there is a break statement
> missing before the "default" case, does Netbeans throw some warning. Is the
> fallthrough warning technically
> supposed to be thrown only when the logic falls through to the default case
> then?

That's my understanding with the javac compiler yes. I think it was the balance
that the javac folk thought was a sensible compromise in terms of not
too many false positive warnings.


More information about the core-libs-dev mailing list