We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
detected at https://github.com/checkstyle/checkstyle/pull/14856/files#r1597531069
I have read check documentation: https://checkstyle.org/checks/coding/unnecessaryparentheses.html#UnnecessaryParentheses I have downloaded the latest checkstyle from: https://checkstyle.org/cmdline.html#Download_and_Run I have executed the cli and showed it below, as cli describes the problem better than 1,000 words
$ cat config.xml <?xml version="1.0"?> <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd"> <module name="Checker"> <module name="TreeWalker"> <module name="UnnecessaryParentheses"> </module> </module> </module> $ cat Test.java import java.util.Arrays; public class Test { public static void main(String[] args) { String[] a = { "s", "", "1", "", "" }; Arrays.stream(a).filter(s -> !((boolean)s.isEmpty())).toArray(String[]::new); // should be violation Arrays.stream(a).filter(s -> !(boolean)s.isEmpty()).toArray(String[]::new); } } $ java -jar checkstyle-10.16.0-all.jar -c config.xml Test.java Starting audit... Audit done.
Expected: violation on line 7
The text was updated successfully, but these errors were encountered:
No branches or pull requests
detected at https://github.com/checkstyle/checkstyle/pull/14856/files#r1597531069
I have read check documentation: https://checkstyle.org/checks/coding/unnecessaryparentheses.html#UnnecessaryParentheses
I have downloaded the latest checkstyle from: https://checkstyle.org/cmdline.html#Download_and_Run
I have executed the cli and showed it below, as cli describes the problem better than 1,000 words
Expected: violation on line 7
The text was updated successfully, but these errors were encountered: