File tree 1 file changed +3
-0
lines changed
src/test/java/com/fasterxml/jackson/databind/jsontype
1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 3
3
import org .junit .jupiter .api .Test ;
4
4
5
5
import com .fasterxml .jackson .annotation .JsonTypeInfo ;
6
+
6
7
import com .fasterxml .jackson .databind .MapperFeature ;
7
8
import com .fasterxml .jackson .databind .ObjectMapper ;
8
9
import com .fasterxml .jackson .databind .exc .InvalidDefinitionException ;
12
13
13
14
import static org .junit .jupiter .api .Assertions .assertEquals ;
14
15
import static org .junit .jupiter .api .Assertions .assertThrows ;
16
+ import static org .junit .jupiter .api .Assertions .fail ;
15
17
16
18
// https://github.com/FasterXML/jackson-databind/issues/5016
17
19
public class PolymorphicDeserSubtypeCheck5016Test extends DatabindTestUtil
@@ -90,6 +92,7 @@ public void testBlockingOfRunnable() throws Exception {
90
92
assertEquals (animalInfo .thisType .name , newInfo0 .thisType .name );
91
93
try {
92
94
mapper .readValue (serialized , RunnableInfo .class );
95
+ fail ("Should not pass" );
93
96
} catch (InvalidDefinitionException e ) {
94
97
verifyException (e , "PolymorphicTypeValidator" );
95
98
verifyException (e , "denied resolution of all subtypes of base type `java.lang.Runnable`" );
You can’t perform that action at this time.
0 commit comments