eclipse-ee4j / eclipse-ee4j/jersey

isInjectionProvider should also handle Instance

Open
#4,179 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.