aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
authorRoman / Linnea Gräf <roman.graef@gmail.com>2023-02-18 15:24:52 +0100
committerGitHub <noreply@github.com>2023-02-18 15:24:52 +0100
commit0d281d483909d71272783033b2aba8f33dcbce36 (patch)
treee59f05fe4b22f989b5a600e66d7b8c9aaecda37c /src/test/java
parentb12da67a08b6808363c0ad130fe8c3bc6f00f7b2 (diff)
downloadNotEnoughUpdates-0d281d483909d71272783033b2aba8f33dcbce36.tar.gz
NotEnoughUpdates-0d281d483909d71272783033b2aba8f33dcbce36.tar.bz2
NotEnoughUpdates-0d281d483909d71272783033b2aba8f33dcbce36.zip
ApiCache: Fix apparent NullPointerException (#619)
`CacheResult` should in theory have either a `file != null` a `future != null` or be `disposed`. Apparently this invariant of `CacheResult` is either being violated somewhere, or the `synchronized` blocks arent as synchronized as id hoped they were. In fact, `dispose()` does not even delete the file, so i can really only see this happening because the first `synchronized` block that writes the file and the second `synchronized` block that reads from the file hold the same lock. I have no idea how this would happen, but hopefully this fixes it (since the dispose didn't have a threading issue reported so far, i feel more confident leaving the .deleteOnExit in there, but I'm also wrapping any potential IOExceptions during access, because I am just so confused how the internal state was broken.
Diffstat (limited to 'src/test/java')
0 files changed, 0 insertions, 0 deletions