Skip to content

Commit 49f4dae

Browse files
authored
Added a constructor to InvalidNullException that allows JsonParser to be passed directly (#4900)
1 parent 369e449 commit 49f4dae

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/main/java/com/fasterxml/jackson/databind/exc/InvalidNullException.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.fasterxml.jackson.databind.exc;
22

3+
import com.fasterxml.jackson.core.JsonParser;
34
import com.fasterxml.jackson.databind.DeserializationContext;
45
import com.fasterxml.jackson.databind.JavaType;
56
import com.fasterxml.jackson.databind.PropertyName;
@@ -27,11 +28,18 @@ public class InvalidNullException
2728
/**********************************************************
2829
*/
2930

31+
/**
32+
* @since 2.19
33+
*/
34+
protected InvalidNullException(JsonParser p, String msg, PropertyName pname) {
35+
super(p, msg);
36+
_propertyName = pname;
37+
}
38+
3039
protected InvalidNullException(DeserializationContext ctxt, String msg,
3140
PropertyName pname)
3241
{
33-
super(ctxt == null ? null : ctxt.getParser(), msg);
34-
_propertyName = pname;
42+
this(ctxt == null ? null : ctxt.getParser(), msg, pname);
3543
}
3644

3745
public static InvalidNullException from(DeserializationContext ctxt,

0 commit comments

Comments
 (0)