-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
MINOR: Rewrite unchecked operations in Mock API #19071
base: trunk
Are you sure you want to change the base?
MINOR: Rewrite unchecked operations in Mock API #19071
Conversation
…se the implementation of InvocationOnMock discards type anyway.
…I, because the implementation of InvocationOnMock discards type anyway." This reverts commit ef6d475.
…se the implementation of InvocationOnMock discards type anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank @clarkwtc for this patch, left a comment
final ValueTransformerWithKeySupplier<String, String, ?> valueTransformerSupplier = | ||
mock(ValueTransformerWithKeySupplier.class); | ||
final ValueTransformerWithKeySupplier<String, String, ?> valueTransformerSupplier = mock(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for checking again.
I’ve fixed it.
…x-directly-invocation-method-for-getargument
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change the type to var
keyword?
This change is meant to resolve the unchecked cast for KTableImpl. |
@clarkwtc
In this way, there will be no warning during the build. |
We encountered unchecked or unsafe operations in
GroupMetadataManagerTest.java
andKTableImplTest.java
.Rewrite getArgument of invocation in InvocationOnMock API because the implementation of InvocationOnMock discards type anyway.
Remove unchecked annotations for using mock API without variable assignment.
Follow-up: mockito/mockito#1609