Skip to content

Commit 83e5147

Browse files
committed
Minor addition related to FasterXML#1087: resolve context type, assuming type bindings from that are expected to work.
1 parent 036fe28 commit 83e5147

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/com/fasterxml/jackson/databind/type/TypeFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ public JavaType constructType(TypeReference<?> typeRef)
599599
*/
600600
@Deprecated
601601
public JavaType constructType(Type type, Class<?> contextType) {
602-
return _fromAny(null, type, EMPTY_BINDINGS);
602+
return constructType(type, constructType(contextType));
603603
}
604604

605605
/**

src/test/java/com/fasterxml/jackson/failing/ExternalTypeId999Test.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ public static class Message<P extends Payload>
2828
public Message(@JsonProperty("type") String type,
2929
@JsonProperty("payload") P payload)
3030
{
31-
if (type == null) {
32-
throw new RuntimeException("'type' is null");
33-
}
3431
if (payload == null) {
3532
throw new RuntimeException("'payload' is null");
3633
}
34+
if (type == null) {
35+
throw new RuntimeException("'type' is null");
36+
}
3737
this.type = type;
3838
this.payload = payload;
3939
}

0 commit comments

Comments
 (0)