[ 
https://issues.apache.org/jira/browse/LUCENE-3477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13118137#comment-13118137
 ] 

Steven Rowe commented on LUCENE-3477:
-------------------------------------

Thanks Mike!

bq. All these seem to be identical (fall-throughs to breaks). Looks fine to me.

Right, I too checked all of the locations, and as you say, all fall-throughs 
were to cases that were break-only.  This was likely intentionally generated 
code, rather than spookiness, and given that it's not intended to be user 
modifiable, probably not a problem or source of potential future problems.  
That said, JFlex code generation should add breaks for emtpy/comment-only 
user-supplied action code, or at least turn off fallthrough warnings with a 
compiler directive.

The real problem here is the warnings, which Mike's patch fixes.  (Having to 
add "naked" breaks does seem weird, but it's functional.)

I successfully regenerated from the .jflex sources ({{ant jflex}} under 
{{modules/analysis/common/}}, and all tests pass.

+1
                
> Fix JFlex tokenizer compiler warnings
> -------------------------------------
>
>                 Key: LUCENE-3477
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3477
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>             Fix For: 3.5, 4.0
>
>         Attachments: LUCENE-3477.patch
>
>
> We get lots of distracting fallthrough warnings running "ant compile"
> in modules/analysis, from the tokenizers generated from JFlex.
> Digging a bit, they actually do look spooky.
> So I managed to edit the JFlex inputs to insert a bunch of break
> statements in our rules, but I have no idea if this is
> right/dangerous, and it seems a bit weird having to do such insertions
> of "naked" breaks.
> But, this does fix all the warnings, and all tests pass...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to