Skip to content

Commit 634f1e4

Browse files
committed
Fix #2593: improve StackTraceElement deserialization
1 parent e33f7c4 commit 634f1e4

File tree

3 files changed

+25
-7
lines changed

3 files changed

+25
-7
lines changed

release-notes/CREDITS

+18-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,34 @@
11
Here are people who have contributed to the development of Jackson JSON processor
22
databind core component, version 3.x
3-
Version numbers in brackets indicate release in which the problem was fixed
3+
(version numbers in brackets indicate release in which the problem was fixed)
44

55
(note: for older credits, see `CREDITS-2.x` instead)
66

7-
Tatu Saloranta, [email protected]: author
7+
Author: Tatu Saloranta, [email protected]: author
88

9-
Alexander Koshman (akoshman@github)
9+
Co-Authors (with only partial listings below):
10+
11+
* Joo Hyuk Kim (@JooHyukKim)
12+
* PJ Fanning (@pjfanning)
13+
* Sim Yih Tsern (@yihtsern)
14+
15+
----------------------------------------------------------------------------
16+
17+
Alexander Koshman (@akoshman)
1018
* Requested #1600: Serializing locale with underscore, not standard hyphen
1119
[3.0.0]
1220

13-
XakepSDK@github
21+
@XakepSDK
1422
* Requested #2013: Allow use of `java.nio.file.Path` for `readValue()`, `writeValue()`
1523
[3.0.0]
1624
* Requested #2411: `valueToTree()` during serialization (via `SerializerProvider()`)
1725
[3.0.0]
1826

19-
Sven Döring (sdoeringNew@github)
27+
Sven Döring (@sdoeringNew)
2028
* Contributed #2013: Allow use of `java.nio.file.Path` for `readValue()`, `writeValue()`
2129
[3.0.0]
30+
31+
Michael Dillon (@michaelcdillon)
32+
#2593: StackTraceElement w/ >= Java 9 doesn't deserialize properly
33+
(requested by Michael D)
34+

release-notes/VERSION

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ Versions: 3.x (for earlier see VERSION-2.x)
5050
(requested by XakepSDK@github)
5151
#2539: Add `Deserializers.hasDeserializerFor()` (and something for `DeserializerFactory`)
5252
to allow detection of explicitly supported types
53+
#2593: StackTraceElement w/ >= Java 9 doesn't deserialize properly
54+
(requested by Michael D)
5355
#2713: Change wording of `UnrecognizedPropertyException` to refer to "property" not "field"
5456
#2828: Add `DatabindException` as intermediate subtype of `JsonMappingException`
5557
#3028: Change `UUIDSerializer` to use `StreamWriteCapability` check instead of

src/main/java/tools/jackson/databind/deser/jdk/StackTraceElementDeserializer.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,17 @@ protected StackTraceElement constructValue(DeserializationContext ctxt,
7171
{
7272
// 21-May-2016, tatu: With Java 9, could use different constructor, probably
7373
// via different module, and throw exception here if extra args passed
74-
return new StackTraceElement(className, methodName, fileName, lineNumber);
74+
// 08-Dec-2024, tatu: With Jackson 3.0 can use full Java 9 introduced
75+
// constructor, finally
76+
return new StackTraceElement(classLoaderName, moduleName, moduleVersion,
77+
className, methodName, fileName, lineNumber);
7578
}
7679

7780
/**
7881
* Intermediate class used both for convenience of binding and
7982
* to support {@code PropertyNamingStrategy}.
8083
*/
81-
public final static class Adapter {
84+
protected final static class Adapter {
8285
// NOTE: some String fields must not be nulls
8386
public String className = "", classLoaderName;
8487
public String declaringClass, format;

0 commit comments

Comments
 (0)