lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Rowe (Commented) (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3477) Fix JFlex tokenizer compiler warnings
Date Fri, 30 Sep 2011 15:23:47 GMT


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.

> Fix JFlex tokenizer compiler warnings
> -------------------------------------
>                 Key: LUCENE-3477
>                 URL:
>             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:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message