You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Stefan Bodewig <bo...@apache.org> on 2005/03/09 09:05:29 UTC
Fallthrough in FixCrLfFilter.java intended?
Hi,
Jikes complains
,----
| Issued 1 semantic warning compiling "src/main/org/apache/tools/ant/filters/FixCrLfFilter.java":
|
| <---------------------
| 525. case TRANS_TO_COMMENT:
| . . .
| 533. }
| ---------------->
| *** Semantic Warning: This switch block can fall through to the next case. Did you forget a break statement?
`----
and from a first glance at the code I think this really is a bug and
the break is missing. Consider what happens in the state ==
TRANS_TO_COMMENT && thisChar == '/' case.
On a related note, I personally prefer to have break in the very
latest case of a switch statement as well as I always forget to add
once when I add another case at the end otherwise. With that break
would also be missing three lines below the line Jikes talks about.
Hmm, maybe I should write a testcase to prove Jikes is correct.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org