Resolve Java 21 ftbfs
This MR resolves 1057526.
Changes:
- apply proposed fix to resolve Java 21 ftbfs.
Note: I have made a change in line with the existing code, but would've preferred to rewrite the method to use relative offset from getStackTrace(). I do not know why arbitrary offset approach have been chosen. If performance was the key for the method, then we should be using offsets despite implementation being quite brittle.
Testing:
- rebuild in sid chroot
- rebuild in Java 21 default sid chroot