@@ -219,10 +219,14 @@ private List<AnnotatedMethod> _findPotentialFactories(TypeFactory typeFactory,
219
219
// 27-Oct-2020, tatu: SIGH. As per [databind#2894] there is widespread use of
220
220
// incorrect bindings in the wild -- not supported (no tests) but used
221
221
// nonetheless. So, for 2.11.x, put back "Bad Bindings"...
222
- // final TypeResolutionContext typeResCtxt = _typeContext;
222
+ //
223
223
224
224
// 03-Nov-2020, ckozak: Implement generic JsonCreator TypeVariable handling [databind#2895]
225
- final TypeResolutionContext emptyTypeResCtxt = new TypeResolutionContext .Empty (typeFactory );
225
+ // final TypeResolutionContext emptyTypeResCtxt = new TypeResolutionContext.Empty(typeFactory);
226
+
227
+ // 23-Aug-2021, tatu: Double-d'oh! As per [databind#3220], we must revert to
228
+ // the Incorrect Illogical But Used By Users Bindings... for 2.x at least.
229
+ final TypeResolutionContext initialTypeResCtxt = _typeContext ;
226
230
227
231
int factoryCount = candidates .size ();
228
232
List <AnnotatedMethod > result = new ArrayList <>(factoryCount );
@@ -247,7 +251,7 @@ private List<AnnotatedMethod> _findPotentialFactories(TypeFactory typeFactory,
247
251
if (key .equals (methodKeys [i ])) {
248
252
result .set (i ,
249
253
constructFactoryCreator (candidates .get (i ),
250
- emptyTypeResCtxt , mixinFactory ));
254
+ initialTypeResCtxt , mixinFactory ));
251
255
break ;
252
256
}
253
257
}
@@ -261,8 +265,9 @@ private List<AnnotatedMethod> _findPotentialFactories(TypeFactory typeFactory,
261
265
// 06-Nov-2020, tatu: Fix from [databind#2895] will try to resolve
262
266
// nominal static method type bindings into expected target type
263
267
// (if generic types involved)
268
+ // 23-Aug-2021, tatu: ... is this still needed, wrt un-fix in [databind#3220]?
264
269
TypeResolutionContext typeResCtxt = MethodGenericTypeResolver .narrowMethodTypeParameters (
265
- candidate , type , typeFactory , emptyTypeResCtxt );
270
+ candidate , type , typeFactory , initialTypeResCtxt );
266
271
result .set (i ,
267
272
constructFactoryCreator (candidate , typeResCtxt , null ));
268
273
}
0 commit comments