spotify / missinglink

Build time tool for detecting link problems in java projects
Apache License 2.0
146 stars 27 forks source link

fix method reference of set of incorrect type #302

Closed richardstephens closed 1 year ago

richardstephens commented 1 year ago

filterConflictsBy expects a predicate that operates on a Conflict, but the code passes a method reference to categoriesToInclude::contains, which is a set of type ConflictCategory. Instead, pass a lambda to check if the conflict's category is in the set.

Discovered while porting the Maven implemenation to run with Bazel

codecov[bot] commented 1 year ago

Codecov Report

Merging #302 (19a4eb6) into master (10a26fe) will decrease coverage by 4.48%. The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master     #302      +/-   ##
============================================
- Coverage     85.20%   80.73%   -4.48%     
+ Complexity      237      232       -5     
============================================
  Files            23       23              
  Lines           872      872              
  Branches        104      104              
============================================
- Hits            743      704      -39     
- Misses           92      129      +37     
- Partials         37       39       +2     
Impacted Files Coverage Δ
.../java/com/spotify/missinglink/maven/CheckMojo.java 89.28% <100.00%> (-0.80%) :arrow_down:
...ava/com/spotify/missinglink/Java9ModuleLoader.java 0.00% <0.00%> (-78.58%) :arrow_down:
...otify/missinglink/datamodel/MethodDescriptors.java 79.31% <0.00%> (-6.90%) :arrow_down:
...n/java/com/spotify/missinglink/ArtifactLoader.java 79.72% <0.00%> (-1.36%) :arrow_down:
.../java/com/spotify/missinglink/ConflictChecker.java 86.53% <0.00%> (-0.65%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

mattnworb commented 1 year ago

https://github.com/spotify/missinglink/releases/tag/v0.2.7