@@ -24,13 +24,16 @@ public StackTraceElement deserialize(JsonParser p, DeserializationContext ctxt)
24
24
String className = "" , methodName = "" , fileName = "" ;
25
25
// Java 9 adds couple more things
26
26
String moduleName = null , moduleVersion = null ;
27
+ String classLoaderName = null ;
27
28
int lineNumber = -1 ;
28
29
29
30
while ((t = p .nextValue ()) != JsonToken .END_OBJECT ) {
30
31
String propName = p .getCurrentName ();
31
32
// TODO: with Java 8, convert to switch
32
33
if ("className" .equals (propName )) {
33
34
className = p .getText ();
35
+ } else if ("classLoaderName" .equals (propName )) {
36
+ classLoaderName = p .getText ();
34
37
} else if ("fileName" .equals (propName )) {
35
38
fileName = p .getText ();
36
39
} else if ("lineNumber" .equals (propName )) {
@@ -53,7 +56,7 @@ public StackTraceElement deserialize(JsonParser p, DeserializationContext ctxt)
53
56
}
54
57
}
55
58
return constructValue (ctxt , className , methodName , fileName , lineNumber ,
56
- moduleName , moduleVersion );
59
+ moduleName , moduleVersion , classLoaderName );
57
60
} else if (t == JsonToken .START_ARRAY && ctxt .isEnabled (DeserializationFeature .UNWRAP_SINGLE_VALUE_ARRAYS )) {
58
61
p .nextToken ();
59
62
final StackTraceElement value = deserialize (p , ctxt );
@@ -65,14 +68,22 @@ public StackTraceElement deserialize(JsonParser p, DeserializationContext ctxt)
65
68
return (StackTraceElement ) ctxt .handleUnexpectedToken (_valueClass , p );
66
69
}
67
70
71
+ @ Deprecated // since 2.9
72
+ protected StackTraceElement constructValue (DeserializationContext ctxt ,
73
+ String className , String methodName , String fileName , int lineNumber ,
74
+ String moduleName , String moduleVersion ) {
75
+ return constructValue (ctxt , className , methodName , fileName , lineNumber ,
76
+ moduleName , moduleVersion , null );
77
+ }
78
+
68
79
/**
69
80
* Overridable factory method used for constructing {@link StackTraceElement}s.
70
81
*
71
82
* @since 2.8
72
83
*/
73
84
protected StackTraceElement constructValue (DeserializationContext ctxt ,
74
85
String className , String methodName , String fileName , int lineNumber ,
75
- String moduleName , String moduleVersion )
86
+ String moduleName , String moduleVersion , String classLoaderName )
76
87
{
77
88
// 21-May-2016, tatu: With Java 9, need to use different constructor, probably
78
89
// via different module, and throw exception here if extra args passed
0 commit comments