Thanks for the reviews! On Tue, Aug 20, 2019 at 8:21 AM Martin Buchholz <marti...@google.com> wrote:
> Looks good to me. > > On Mon, Aug 19, 2019 at 4:15 PM Arthur Eubanks <aeuba...@google.com> > wrote: > >> Bug: https://bugs.openjdk.java.net/browse/JDK-8229899 >> Webrev: http://cr.openjdk.java.net/~aeubanks/8229899/webrev.00/ >> >> final boolean isInvalid() { >> if (status == null) { >> status = (this.path.indexOf('\u0000') < 0) ? >> PathStatus.CHECKED >> : >> PathStatus.INVALID; >> } >> return status == PathStatus.INVALID; >> } >> If the reads to "status" are reordered and another thread writes to >> "status", the return value can be wrong. >> Reading "status" to a local variable fixes the issue. >> >