Skip to content

Commit

Permalink
actually real fix for #2155 is here
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Nov 20, 2018
1 parent dd6d460 commit ccbd8d1
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ private String _resolveTypePlaceholders(JavaType sourceType, JavaType actualType
for (int i = 0, len = expectedTypes.size(); i < len; ++i) {
JavaType exp = expectedTypes.get(i);
JavaType act = actualTypes.get(i);

if (!_verifyAndResolvePlaceholders(exp, act)) {
// 14-May-2018, tatu: As per [databind#2034] it seems we better relax assignment
// rules further -- at least likely "raw" (untyped, non-generic) base should probably
Expand All @@ -470,6 +471,13 @@ private String _resolveTypePlaceholders(JavaType sourceType, JavaType actualType
continue;
}
}
// 19-Nov-2018, tatu: To solve [databind#2155], let's allow type-compatible
// assignment for interfaces at least...
if (exp.isInterface()) {
if (exp.isTypeOrSuperTypeOf(act.getRawClass())) {
continue;
}
}
return String.format("Type parameter #%d/%d differs; can not specialize %s with %s",
(i+1), len, exp.toCanonical(), act.toCanonical());
}
Expand Down

0 comments on commit ccbd8d1

Please sign in to comment.