Issue #17988: Add UnnecessaryLambda #18479#17985
Conversation
62e161e to
edf88cb
Compare
|
New surviving error(s) found: Source File: "AvoidDoubleBraceInitializationCheck.java" |
|
yes this code is pureness of DRY and rendundudancie making it imopossible for me to contribute: i have not the muse to handle all this overhead its driving me crazy. In combination with the missiing autoformat i can not continue anymore wasting my time on such obsoletes. |
dbb1938 to
24a6b4a
Compare
| /** | ||
| * Set of token types that are used in {@link #HAS_MEMBERS} predicate. | ||
| */ | ||
| private static final BitSet IGNORED_TYPES = TokenUtil.asBitSet( |
There was a problem hiding this comment.
considering this an obsolete impl. detail.
| */ | ||
| private static String replaceVersionString(String report) { | ||
| final String version = SarifLogger.class.getPackage().getImplementationVersion(); | ||
| return report.replace(VERSION_PLACEHOLDER, String.valueOf(version)); |
There was a problem hiding this comment.
String.valueOf(String) makes no sense this is an bug in the framework as the change is unrelated but enforced.
| return hasInitBlock | ||
| && TokenUtil.findFirstTokenByPredicate(objBlock, HAS_MEMBERS).isEmpty(); | ||
| return objBlock.findFirstToken(TokenTypes.INSTANCE_INIT) != null | ||
| && TokenUtil.findFirstTokenByPredicate( |
There was a problem hiding this comment.
| && TokenUtil.findFirstTokenByPredicate( | |
| &&findFirstTokenByPredicate( |
Thats the big problem for NotStatic importing its full of obsolete stuff.
Its actually just doing findFirstToken and findFirstTokenByPredicate but there is too much fuzz and noice going on hiding the actual intend.
|
item: |
|
Please read and watch videos at Starting_Development. As you go deeper in code, I highly recommend you path through good xxxx issues to understand what quality levels we have and why all such stuff is here. |
24a6b4a to
3fe7364
Compare
|
still NPE issue this seems strange. |
|
prone not working anyways on CI as discovered this needs to be fixed. |
| -Xep:EffectivelyPrivate:ERROR | ||
| -Xep:EmptyMethod:ERROR | ||
| -Xep:EnumOrdinal:ERROR | ||
| -Xep:EqualsUsingHashCode:ERROR |
There was a problem hiding this comment.
new and low hanging fruit (only 1) to test if setup is working.
| -Xep:TimeZoneUsage:ERROR | ||
| -Xep:TruthAssertExpected:ERROR | ||
| -Xep:TypeParameterUnusedInFormals:ERROR | ||
| -Xep:UnnecessaryLambda:ERROR |
There was a problem hiding this comment.
new and low hanging fruit (only 1) to test if setup is working.
| -Xep:UnnecessaryLambda:ERROR | ||
| -Xep:UnusedMethod:ERROR | ||
| -Xep:VoidUsed:ERROR | ||
| -Xep:FormatStringShouldUsePlaceholders:ERROR |
| <goal>compile</goal> | ||
| </goals> | ||
| <configuration> | ||
| <failOnError>false</failOnError> |
f78e1f5 to
dceeca6
Compare
| </goals> | ||
| <configuration> | ||
| <failOnError>false</failOnError> | ||
| <failOnError>true</failOnError> |
There was a problem hiding this comment.
🦢
without this its no fun, leaking all the error to prod.
7dbe834 to
4e75b9b
Compare
|
await enabler |

Issue #17988: Add
UnnecessaryLambda#18479UnnecessaryLambdadiffplug/spotless#2696