Skip to content

Commit

Permalink
Fix FasterXML#3419 do not generate stack trace for UnresolvedForwardR…
Browse files Browse the repository at this point in the history
…eference thrown internally.
  • Loading branch information
morganga committed Mar 21, 2022
1 parent 0ede935 commit a7cf133
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public void checkUnresolvedObjectId() throws UnresolvedForwardReference
continue;
}
if (exception == null) {
exception = new UnresolvedForwardReference(getParser(), "Unresolved forward references for: ");
exception = new UnresolvedForwardReference(getParser(), "Unresolved forward references for: ")._fillInStackTrace();
}
Object key = roid.getKey().key;
for (Iterator<Referring> iterator = roid.referringProperties(); iterator.hasNext(); ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,14 @@ public String getMessage()
sb.append('.');
return sb.toString();
}

@Override
public synchronized UnresolvedForwardReference fillInStackTrace() {
return this;
}

public synchronized UnresolvedForwardReference _fillInStackTrace() {
super.fillInStackTrace();
return this;
}
}

0 comments on commit a7cf133

Please sign in to comment.