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

Add annotation to allow passthrough default methods on assisted factories #1760

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jpenilla
Copy link

@jpenilla jpenilla commented Aug 4, 2023

Fixes #1345

Add @PassthroughDefaultMethods annotation to allow using default methods on assisted factories (but only when explicitly requested by the user, see #1347 (comment))

As mentioned in the linked comment, we don't want to change existing behavior in case anyone is relying on it. So instead we add an annotation to specify what behavior we want. If the annotation was only able to be placed on individual methods, a more generic name like @Unassisted might be ok, however since I am also allowing the annotation on factory interfaces, I felt a more specific name made sense.

@google-cla
Copy link

google-cla bot commented Aug 4, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@jpenilla jpenilla force-pushed the feat/passthrough-default-methods branch from 41695cb to 6b69db1 Compare August 5, 2023 00:02
…thods on assisted factories (but only when explicitly requested by the user, see google#1347 (comment))
@jpenilla jpenilla force-pushed the feat/passthrough-default-methods branch from 6b69db1 to 1373b06 Compare August 5, 2023 00:02
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.

AssistedInject factories should call their default methods without stubbing
1 participant