Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ public Object findInjectableValueId(AnnotatedMember m)
if (m instanceof AnnotatedMethod) {
throw new IAE("Annotated methods don't work very well yet...");
}
return Key.get(m.getGenericType());
return Key.get(m.getType());
}
return Key.get(m.getGenericType(), guiceAnnotation);
return Key.get(m.getType(), guiceAnnotation);
}

Comment on lines +63 to 65
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
return Key.get(m.getType(), guiceAnnotation);
}
return Key.get(getParamType(m), guiceAnnotation);
}
private Type getParamType(AnnotatedMember m) {
if(m.getType().isContainerType()){
return Types.newParameterizedType(m.getType().getRawClass(), m.getType().getContentType().getRawClass());
}
return m.getRawType();
}

This seems to work for me (and of course changing the Key.get(m.getType()); to Key.get(getParamType(m)); on line 61.

But this was on version 0.22.1 and I'm not sure if this is as robust handling that could be needed.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Thanks for the suggestion, @CookieAroundTheBend ! I will try to spend some time on this and get it resolved soon.

/**
Expand Down
4 changes: 2 additions & 2 deletions licenses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ name: Jackson
license_category: binary
module: java-core
license_name: Apache License version 2.0
version: 2.10.5
version: 2.13.4
libraries:
- com.fasterxml.jackson.core: jackson-annotations
- com.fasterxml.jackson.core: jackson-core
Expand Down Expand Up @@ -278,7 +278,7 @@ name: Jackson
license_category: binary
module: java-core
license_name: Apache License version 2.0
version: 2.10.5.1
version: 2.13.4.2
libraries:
- com.fasterxml.jackson.core: jackson-databind
notice: |
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
<hamcrest.version>1.3</hamcrest.version>
<jetty.version>9.4.48.v20220622</jetty.version>
<jersey.version>1.19.4</jersey.version>
<jackson.version>2.10.5.20201202</jackson.version>
<jackson.version>2.13.4.20221013</jackson.version>
<codehaus.jackson.version>1.9.13</codehaus.jackson.version>
<log4j.version>2.18.0</log4j.version>
<mysql.version>5.1.49</mysql.version>
Expand Down