Skip to content
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

Deprecate ListUtil and Fields classes #2593

Merged
merged 3 commits into from Mar 16, 2022

Conversation

andreisilviudragnea
Copy link
Contributor

  • Deprecated ListUtil class in favor of Java 8 Streams
  • Deprecated unused Fields class

Relates to #1926.

@codecov-commenter
Copy link

codecov-commenter commented Mar 14, 2022

Codecov Report

Merging #2593 (84743b4) into main (813add0) will decrease coverage by 0.07%.
The diff coverage is 83.33%.

❗ Current head 84743b4 differs from pull request most recent head 4d957e4. Consider uploading reports for the commit 4d957e4 to get more accurate results

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #2593      +/-   ##
============================================
- Coverage     86.65%   86.57%   -0.08%     
- Complexity     2795     2804       +9     
============================================
  Files           321      321              
  Lines          8368     8357      -11     
  Branches       1024     1020       -4     
============================================
- Hits           7251     7235      -16     
- Misses          849      854       +5     
  Partials        268      268              
Impacted Files Coverage Δ
...rg/mockito/internal/util/collections/ListUtil.java 54.54% <ø> (-45.46%) ⬇️
...a/org/mockito/internal/util/reflection/Fields.java 82.92% <40.00%> (-0.41%) ⬇️
...guration/injection/PropertyAndSetterInjection.java 100.00% <100.00%> (ø)
...mockito/internal/debugging/InvocationsPrinter.java 100.00% <100.00%> (ø)
...mockito/internal/invocation/InvocationsFinder.java 100.00% <100.00%> (ø)
...invocation/finder/VerifiableInvocationsFinder.java 100.00% <100.00%> (ø)
.../mockito/internal/junit/UnusedStubbingsFinder.java 100.00% <100.00%> (ø)
...nal/verification/DefaultRegisteredInvocations.java 95.65% <100.00%> (+0.19%) ⬆️
...erification/checkers/MissingInvocationChecker.java 86.95% <100.00%> (-1.05%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 813add0...4d957e4. Read the comment docs.

Copy link
Contributor

@TimvdLippe TimvdLippe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With "Android users", I meant those that are using Mockito on older versions of Android that does not support lambda's and all. However, these projects can desugar, which might solve the problem.

Therefore, if we are still compatible with Android SDK 24 (I believe that's the version we use), I think we can merge this as-is. Let's see what CI says.

Copy link
Contributor

@TimvdLippe TimvdLippe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like CI is happy, so we can make this change after all. Thanks for submitting this again! Only a couple of small comments.

Copy link
Contributor

@TimvdLippe TimvdLippe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for getting back to us! Yes, this is a great cleanup and the Stream usages read a lot cleaner than we had before. Merging 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants