> If there are two threads calling `Executable.hasRealParameterData()` under > race and the first one writes into volatile `Executable.parameters` field > (doing _releasing store_) and the second thread reads non-null value from the > same field (doing acquiring read) then it must read exactly the same value > written into `hasRealParameterData` within `privateGetParameters()`. The > reason for this is that we assign `hasRealParameterData` before _releasing > store_. > > In the opposite case (_acquiring read_ reads null) the second thread writes > the value itself and returns it from the method so there is no change in > behavior.
Сергей Цыпанов has updated the pull request incrementally with one additional commit since the last revision: Update src/java.base/share/classes/java/lang/reflect/Executable.java Co-authored-by: liach <7806504+li...@users.noreply.github.com> ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9143/files - new: https://git.openjdk.org/jdk/pull/9143/files/711e175f..e1da00b2 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9143&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9143&range=04-05 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/9143.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9143/head:pull/9143 PR: https://git.openjdk.org/jdk/pull/9143