Skip to content
Closed
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 @@ -192,12 +192,12 @@ public BeanSupplier<T> getSupplier(Bindable<T> target) {
});
}

private boolean isOfDifferentType(ResolvableType targetType) {
private boolean isOfDifferentType(ResolvableType targetType,
Class<?> resolvedType) {
if (this.type.hasGenerics() || targetType.hasGenerics()) {
return !this.type.equals(targetType);
}
return this.resolvedType == null
|| !this.resolvedType.equals(targetType.resolve());
return this.resolvedType == null || !this.resolvedType.equals(resolvedType);
}

@SuppressWarnings("unchecked")
Expand All @@ -214,7 +214,7 @@ public static <T> Bean<T> get(Bindable<T> bindable, boolean canCallGetValue) {
return null;
}
Bean<?> bean = Bean.cached;
if (bean == null || bean.isOfDifferentType(type)) {
if (bean == null || bean.isOfDifferentType(type, resolvedType)) {
bean = new Bean<>(type, resolvedType);
cached = bean;
}
Expand Down