The GitHub Actions job "CodeQL" on commons-lang.git/read-lazy-tostring-once has failed. Run started by GitHub user aosen-xiong (triggered by aosen-xiong).
Head commit for run: 4d39ce9f5329de1199ab87d177b25e802889ac92 / Aosen Xiong <[email protected]> [LANG-1837] Fix race conditions in lazily initialized toString caches Fraction.toString(), Fraction.toProperString(), Range.toString() and CharRange.toString() cache their result in a non-volatile field and read that field twice: once for the null check and once for the return. If the first read sees a value written by another thread, the Java Memory Model does not order the second read after that write, so the second read may still return null and the method can return null. Read each field once into a local variable, then test and return the local. This follows up on a64817368d ("Fix race condition in Fraction.hashCode()") for the remaining lazily initialized fields in these immutable classes. There is no functional change for single-threaded callers. Co-Authored-By: Claude Opus 5.5 <[email protected]> Report URL: https://github.com/apache/commons-lang/actions/runs/37529117774 With regards, GitHub Actions via GitBox
