[lworld] RFR: 8254797: [Development] Define & apply annotation jdk.internal.ValueBased

Roger Riggs rriggs at openjdk.java.net
Tue Oct 20 15:30:37 UTC 2020


Define a JDK-internal annotation, jdk.internal.ValueBased, which indicates that a class or interface is value-based,
per: java/lang/doc-files/ValueBased.html

(The switch of the compiler from the existing java.lang.ValueBased to jdk.internal.ValueBased will occur separately).

Apply the annotation wherever existing documentation references ValueBased.html, including:
- The primitive wrapper classes in java.lang;
- The class java.lang.Runtime.Version;
- The "optional" classes in java.util: Optional, OptionalInt, OptionalLong, and OptionalDouble;
- Many classes in the java.time API: Instant, LocalDate, LocalTime, LocalDateTime, ZonedDateTime, ZoneId, OffsetTime,
  OffsetDateTime, ZoneOffset, Duration, Period, Year, YearMonth, and MonthDay, and, in java.time.chrono: MinguoDate,
  HijrahDate, JapaneseDate, and ThaiBuddhistDate;
- The interface java.lang.ProcessHandle and its implementation classes;
- and an initial set of other classes

The CSR for these changes will occur *after* the prototyping of javac and the VM runtime is working.

-------------

Commit messages:
 - Merge branch 'value-based-8254797' of https://github.com/RogerRiggs/valhalla into value-based-8254797
 - Add java.lang.ValueBased and apply to java.lang wrapper and java.time immutable classes
 - Add java.lang.ValueBased and apply to java.lang wrapper and java.time immutable classes

Changes: https://git.openjdk.java.net/valhalla/pull/233/files
 Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=233&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8254797
  Stats: 80 lines in 37 files changed: 78 ins; 1 del; 1 mod
  Patch: https://git.openjdk.java.net/valhalla/pull/233.diff
  Fetch: git fetch https://git.openjdk.java.net/valhalla pull/233/head:pull/233

PR: https://git.openjdk.java.net/valhalla/pull/233



More information about the valhalla-dev mailing list