-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: repo-valhalla
-
Component/s: hotspot
With that change, tests that use @NullRestricted can stop using the @Strict annotation and prepare to adopt `!` in the future.
The language rules for `!` don't do anything to reorder field initializers. As a result, any tests with @NullRestricted fields in identity classes will have to be adjusted so that the field is initialized inside an explicit constructor, before an explicit super() call.
From a quick grep, here is where @NullRestricted gets used:
hotspot/jtreg/compiler: 203 uses
hotspot/jtreg/runtime: 125 uses
hotspot/jtreg/serviceability: 13 uses
micro: 38 uses
jdk: 23 uses
In this bug, we will replace the combinations of both @NR and @Strict to be @NR only.
This requires both of the prerequisites to be completed.
The remaining @Strict will be treated by
- blocks
-
JDK-8376047 [lworld] Remove javac special treatment of @Strict
-
- Resolved
-
- is blocked by
-
JDK-8376033 [lworld] Remove auto early construction from strict fields
-
- Resolved
-
-
JDK-8376045 [lworld] Treat @NullRestricted fields as ACC_STRICT_INIT on load
-
- Resolved
-
- relates to
-
JDK-8376043 [lworld] Convert tests with plain uses of @Strict to use ASMTools
-
- Closed
-
- links to
-
Commit(lworld)
openjdk/valhalla/fe2331d9
-
Review(lworld)
openjdk/valhalla/1959
(1 links to)