@@ -239,7 +239,7 @@ public void testSerialization() throws Exception
239
239
assertEquals ("{\" @type\" :\" typeB\" ,\" b\" :1}" , mapper .writeValueAsString (bean ));
240
240
241
241
// and default name ought to be simple class name; with context
242
- assertEquals ("{\" @type\" :\" TestSubtypesWithSealedTypes $SubD\" ,\" d\" :0}" , mapper .writeValueAsString (new SubD ()));
242
+ assertEquals ("{\" @type\" :\" SealedTypesWithSubtypesTest $SubD\" ,\" d\" :0}" , mapper .writeValueAsString (new SubD ()));
243
243
}
244
244
245
245
@ Test
@@ -249,7 +249,7 @@ public void testDeserializationNonNamed() throws Exception
249
249
// .registerSubtypes(SubC.class)
250
250
.build ();
251
251
// default name should be unqualified class name
252
- SuperType bean = mapper .readValue ("{\" @type\" :\" TestSubtypesWithSealedTypes $SubC\" , \" c\" :1}" , SuperType .class );
252
+ SuperType bean = mapper .readValue ("{\" @type\" :\" SealedTypesWithSubtypesTest $SubC\" , \" c\" :1}" , SuperType .class );
253
253
assertSame (SubC .class , bean .getClass ());
254
254
assertEquals (1 , ((SubC ) bean ).c );
255
255
}
@@ -280,21 +280,21 @@ public void testEmptyBean() throws Exception
280
280
.configure (SerializationFeature .FAIL_ON_EMPTY_BEANS , true )
281
281
.build ();
282
282
String json = mapper .writeValueAsString (new EmptyBean ());
283
- assertEquals ("{\" @type\" :\" TestSubtypesWithSealedTypes $EmptyBean\" }" , json );
283
+ assertEquals ("{\" @type\" :\" SealedTypesWithSubtypesTest $EmptyBean\" }" , json );
284
284
285
285
mapper = jsonMapperBuilder ()
286
286
.configure (SerializationFeature .FAIL_ON_EMPTY_BEANS , false )
287
287
.build ();
288
288
json = mapper .writeValueAsString (new EmptyBean ());
289
- assertEquals ("{\" @type\" :\" TestSubtypesWithSealedTypes $EmptyBean\" }" , json );
289
+ assertEquals ("{\" @type\" :\" SealedTypesWithSubtypesTest $EmptyBean\" }" , json );
290
290
291
291
// and then with defaults
292
292
mapper = jsonMapperBuilder ()
293
293
.configure (SerializationFeature .FAIL_ON_EMPTY_BEANS , false )
294
294
.activateDefaultTyping (NoCheckSubTypeValidator .instance , DefaultTyping .NON_FINAL )
295
295
.build ();
296
296
json = mapper .writeValueAsString (new EmptyNonFinal ());
297
- assertEquals ("[\" tools.jackson.databind.jsontype.TestSubtypesWithSealedTypes $EmptyNonFinal\" ,{}]" , json );
297
+ assertEquals ("[\" tools.jackson.databind.jsontype.SealedTypesWithSubtypesTest $EmptyNonFinal\" ,{}]" , json );
298
298
}
299
299
300
300
@ Test
0 commit comments