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

Reintroduce inheriting type annotations from interfaces if only one interface is mocked, including additional interfaces. #2645

Merged
merged 1 commit into from May 20, 2022

Conversation

raphw
Copy link
Member

@raphw raphw commented May 19, 2022

Without this restriction, the first presented interface might determine the interfaces that are inherited by a subsequent mock that presents the interfaces in a different order. Also, it does not make semantic sense to decide on a particular interface to inherit annotations from. Fixes #2640.

…nterface is mocked, including additional interfaces.

Without this restriction, the first presented interface might determine the interfaces that are inherited by a subsequent mock that presents the interfaces in a different order. Also, it does not make semantic sense to decide on a particular interface to inherit annotations from. Fixes #2640.
@raphw raphw requested a review from TimvdLippe May 19, 2022
@codecov-commenter
Copy link

codecov-commenter commented May 19, 2022

Codecov Report

Merging #2645 (a3d57fd) into main (94e9797) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##               main    #2645   +/-   ##
=========================================
  Coverage     86.24%   86.24%           
- Complexity     2763     2764    +1     
=========================================
  Files           314      314           
  Lines          8280     8282    +2     
  Branches       1029     1029           
=========================================
+ Hits           7141     7143    +2     
  Misses          872      872           
  Partials        267      267           
Impacted Files Coverage Δ
.../creation/bytebuddy/SubclassBytecodeGenerator.java 72.67% <100.00%> (+0.32%) ⬆️

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 94e9797...a3d57fd. Read the comment docs.

Copy link
Contributor

@TimvdLippe TimvdLippe left a comment

Awesome work Rafael! Especially love those tests.

@raphw raphw merged commit d7a8ae0 into main May 20, 2022
7 checks passed
@TimvdLippe TimvdLippe deleted the interface-annotations branch May 20, 2022
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.

Mockito mock of interfaces lost annotation information
3 participants