File tree 2 files changed +17
-4
lines changed
main/java/com/fasterxml/jackson/databind/type
test/java/com/fasterxml/jackson/databind/module
2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -1236,9 +1236,8 @@ else if (type instanceof WildcardType) {
1236
1236
// sanity check
1237
1237
throw new IllegalArgumentException ("Unrecognized Type: " +((type == null ) ? "[null]" : type .toString ()));
1238
1238
}
1239
- /* 21-Feb-2016, nateB/tatu: as per [databind#1129] (applied for 2.7.2),
1240
- * we do need to let all kinds of types to be refined, esp. for Scala module.
1241
- */
1239
+ // 21-Feb-2016, nateB/tatu: as per [databind#1129] (applied for 2.7.2),
1240
+ // we do need to let all kinds of types to be refined, esp. for Scala module.
1242
1241
if (_modifiers != null ) {
1243
1242
TypeBindings b = resultType .getBindings ();
1244
1243
if (b == null ) {
Original file line number Diff line number Diff line change @@ -230,7 +230,21 @@ public void testMapLikeTypeConstruction() throws Exception
230
230
assertNotNull (param );
231
231
assertSame (Integer .class , param .getRawClass ());
232
232
}
233
-
233
+
234
+ // [databind#2395] Can trigger problem this way too
235
+ // NOTE: oddly enough, seems to ONLY fail
236
+ public void testTypeResolutionForRecursive () throws Exception
237
+ {
238
+ ObjectMapper mapper = new ObjectMapper ();
239
+ mapper .registerModule (new SimpleModule () {
240
+ @ Override
241
+ public void setupModule (SetupContext context ) {
242
+ context .addTypeModifier (new MyTypeModifier ());
243
+ }
244
+ });
245
+ assertNotNull (mapper .readTree ("{}" ));
246
+ }
247
+
234
248
public void testCollectionLikeTypeConstruction () throws Exception
235
249
{
236
250
ObjectMapper mapper = new ObjectMapper ();
You can’t perform that action at this time.
0 commit comments