File tree Expand file tree Collapse file tree 3 files changed +30
-1
lines changed
src/main/java/com/fasterxml/jackson/databind/deser Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ Project: jackson-databind
66
772.13 .3 (not yet released )
88
9+ #3419 : Improve performance of `UnresolvedForwardReference ` for forward
10+ reference resolution
11+ (contributed by Gary M )
912#3446 : `java.lang.StringBuffer` cannot be deserialized
1013 (reported by Lolf1010 @github )
1114
Original file line number Diff line number Diff line change @@ -168,7 +168,8 @@ public void checkUnresolvedObjectId() throws UnresolvedForwardReference
168168 continue ;
169169 }
170170 if (exception == null ) {
171- exception = new UnresolvedForwardReference (getParser (), "Unresolved forward references for: " );
171+ exception = new UnresolvedForwardReference (getParser (), "Unresolved forward references for: " )
172+ .withStackTrace ();
172173 }
173174 Object key = roid .getKey ().key ;
174175 for (Iterator <Referring > iterator = roid .referringProperties (); iterator .hasNext (); ) {
Original file line number Diff line number Diff line change @@ -97,4 +97,29 @@ public String getMessage()
9797 sb .append ('.' );
9898 return sb .toString ();
9999 }
100+
101+ /**
102+ * This method is overridden to prevent filling of the stack trace when
103+ * constructors are called (unfortunately alternative constructors can
104+ * not be used due to historical reasons).
105+ * To explicitly fill in stack traces method {@link #withStackTrace()}
106+ * needs to be called after construction.
107+ *
108+ * @since 2.14
109+ */
110+ @ Override
111+ public synchronized UnresolvedForwardReference fillInStackTrace () {
112+ return this ;
113+ }
114+
115+ /**
116+ * "Mutant" factory method for filling in stack trace; needed since the default
117+ * constructors will not fill in stack trace.
118+ *
119+ * @since 2.14
120+ */
121+ public UnresolvedForwardReference withStackTrace () {
122+ super .fillInStackTrace ();
123+ return this ;
124+ }
100125}
You can’t perform that action at this time.
0 commit comments