Review Request: 7193406 - Clean-up JDK Build Warnings in java.util, java.io

Ulf Zibis Ulf.Zibis at CoSoCo.de
Wed Aug 29 11:36:03 UTC 2012


Am 24.08.2012 21:07, schrieb Dan Xu:
> On 08/23/2012 06:53 PM, David Holmes wrote:
>> I'm surprised that you need this:
>>
>>  426     @SuppressWarnings("fallthrough")
>>  ...
>>  436         switch (actions) {
>>  437             case SecurityConstants.FILE_READ_ACTION:
>>  438                 return READ;

Oops, you have reverted the change to use switch-on-Strings by webrev.03. Why?

>>
>> If this generates a fallthrough warning then I think whatever tool generates that warning needs 
>> fixing!
>
> @SuppressWarnings("fallthrough") is put to suppress warnings generated by another switch/case 
> statements
Can't you move it from method scope to there?

>
>             while (i >= matchlen && !seencomma) {
>                 switch(a[i-matchlen]) {
>                 case ',':
>                     seencomma = true;
>                     /*FALLTHROUGH*/
>                 case ' ': case '\r': case '\n':
>                 case '\f': case '\t':
>                     break;
>                 default:
>                     throw new IllegalArgumentException(
>                             "invalid permission: " + actions);
>                 }
>                 i--;
>             }

-Ulf




More information about the core-libs-dev mailing list