eclipse-ee4j / eclipse-ee4j/jersey
isInjectionProvider should also handle Instance
- Dominant language
- Java
- Stars
- 730
- Forks
- 382
- PR merge metrics
- No merged PRs in 30d
Description
While code reading, I noticed this:
https://github.com/eclipse-ee4j/jersey/blob/01cb90387058204ed40430a84e2710e07297296c/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProvider.java#L691-L692
I would think that should be:
```
boolean returnValue = false;
if (injectedType instanceof ParameterizedType) {
final Type rawType = ((ParameterizedType) injectedType).getRawType();
if (rawType instanceof Class) {
final Class rawClass = (Class) rawType;
returnValue = javax.inject.Provider.class.isAssignableFrom(rawClass);
}
}
return returnValue;
```
I just didn't want this to get lost.
Contributor guide
Assessment
This issue has not been assessed yet.