-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
add a new annotation ClassName to be used to indicate the real type of the parameters #9063
base: master
Are you sure you want to change the base?
Conversation
shadows/framework/src/main/java/org/robolectric/shadows/ShadowActivityManager.java
Outdated
Show resolved
Hide resolved
@Mia0451 I recommend you switching to use comments to add types for these APIs instead of WithType. IIRC, there are some code use WithType, but I don't think it is proper to use WithType correctly. I can merge this PR after switching to comments. |
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.
Can you create a new annotation called @ClassName
that is in the Robolectric annotations project? Same directory as @Implementation
. That should be used instead
d3d44de
to
4c6d701
Compare
Created a ClassName annotation, almost same as existing WithType annotation. |
@Mia0451 squash to one commit and use ClassName to replace WithType for your changes. |
This looks great! Can you squash the commits and then I can merge? |
Hello utzcoz@ and hoisie@, |
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.
np. LGTM.
@Mia0451 You need fix code style and commit message checking. |
@Mia0451 The issue still exist. I think you need to learn what these tasks by checking Robolectric's workflow files. |
got you, reading the error msg now. |
Overview
Currently some functions in shadow(s) are using
Object
as the type of the parameter which is not 100% matched the function signature of the shadowed class.Proposed Changes
Create a new annotation which could be used to denote the real type of those
Object
parameters.