This PR proposes declaring some fields as `final` to potentially unlock performance optimisations and improve thread visibility (e.g. for GC threads). The PR also fixes a "synchronising on a non-final field" anti-pattern.
------------- Commit messages: - Declare fields and classes final Changes: https://git.openjdk.org/jdk/pull/11346/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11346&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8297505 Stats: 25 lines in 10 files changed: 0 ins; 0 del; 25 mod Patch: https://git.openjdk.org/jdk/pull/11346.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11346/head:pull/11346 PR: https://git.openjdk.org/jdk/pull/11346