New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Take "break" into consideration in FinalLocalVariable #4082
Comments
Luolc
changed the title
Take
Take "return" and "break" into consideration in FinalLocalVariable
Mar 28, 2017
return
and break
into consideration in FinalLocalVariable
Luolc
added a commit
to Luolc/checkstyle
that referenced
this issue
Mar 28, 2017
…n FinalLocalVariable
I am on it. :) |
Luolc
added a commit
to Luolc/checkstyle
that referenced
this issue
Mar 28, 2017
…n FinalLocalVariable
Luolc
added a commit
to Luolc/checkstyle
that referenced
this issue
Mar 28, 2017
…n FinalLocalVariable
Luolc
added a commit
to Luolc/checkstyle
that referenced
this issue
Mar 28, 2017
…n FinalLocalVariable
Luolc
added a commit
to Luolc/checkstyle
that referenced
this issue
Mar 30, 2017
…n FinalLocalVariable
Luolc
added a commit
to Luolc/checkstyle
that referenced
this issue
Mar 30, 2017
…n FinalLocalVariable
Luolc
added a commit
to Luolc/checkstyle
that referenced
this issue
Apr 9, 2017
…n FinalLocalVariable
Luolc
changed the title
Take "return" and "break" into consideration in FinalLocalVariable
Take "break" into consideration in FinalLocalVariable
Apr 13, 2017
Luolc
added a commit
to Luolc/checkstyle
that referenced
this issue
Apr 13, 2017
Luolc
added a commit
to Luolc/checkstyle
that referenced
this issue
Apr 13, 2017
Luolc
added a commit
to Luolc/checkstyle
that referenced
this issue
Apr 16, 2017
Luolc
added a commit
to Luolc/checkstyle
that referenced
this issue
Apr 16, 2017
Luolc
added a commit
to Luolc/checkstyle
that referenced
this issue
Apr 16, 2017
rnveach
pushed a commit
that referenced
this issue
Apr 18, 2017
Fix is merged |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Taken from #4060 (comment)
There is a regression after the fix in #4060 :
http://www.luolc.com/checkstyle-diff-report/issue3172/openjdk8/xref/Users/LuoLiangchen/personal/develop/java/checkstyle/contribution/checkstyle-tester/repositories/openjdk8/src/share/classes/com/sun/jndi/ldap/LdapCtx.java.html#L2901
The reason is that we didn't take
break
orreturn
into consideration at all. There are even noLITERAL_RETURN
orLITERAL_BREAK
in the acceptable tokens set of the check.Example:
Expected: violation on 3th line.
The check just ignores the
break
at (1) and since there are two assignments ofe
at (0) and (2), the violation won't be raised. That's not correct.The text was updated successfully, but these errors were encountered: