Skip to content
This repository was archived by the owner on Aug 20, 2025. It is now read-only.

Add Linker and Scope toString + tests#156

Open
TWiStErRob wants to merge 3 commits into
JakeWharton:masterfrom
TWiStErRob:linker_tostring
Open

Add Linker and Scope toString + tests#156
TWiStErRob wants to merge 3 commits into
JakeWharton:masterfrom
TWiStErRob:linker_tostring

Conversation

@TWiStErRob
Copy link
Copy Markdown
Contributor

Fixes:

reflect\src\main\java\dagger\reflect\Scope.java:84:
warning: [ObjectToString] Linker is final and does not override Object.toString, so converting it to a string will print its identity (e.g. `Linker@ 4488aabb`) instead of useful information
.
            "Unable to find binding for key=" + key + " with linker=" + linker);
                                                                        ^
    (see https://errorprone.info/bugpattern/ObjectToString)

}

@Test
@IgnoreCodegen
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is actually compiling and working in codegen, but this test would fail at fail() with codegen.
I couldn't find any repro other than OptionalBindingWrongScope where linker was not null, any ideas?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I merged the first two commits while I think about this more.

I didn't realize qualifier annotations on types actually worked...

@TWiStErRob TWiStErRob mentioned this pull request Aug 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants