On Fri, 26 Jun 2026 15:43:09 GMT, Alan Bateman <[email protected]> wrote:
> (work in progress, not ready for ready) > > - Improve preview-comment in class description that defines value class and > value object > - Update spec for the finalize method to make it clear when finalize method > of a value class is never invoked by the garbage collector > - Update the implSpec for the clone to specify behavior of Object.clone for > value objects. Also add paragraph to method description for value objects, > and add API note to advise using copy constructors or static factory methods > instead > - Improve preview-comment in wait/notify methods and drop confusing addition > to IMSE exception > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). src/java.base/share/classes/java/lang/Object.java line 216: > 214: * <p> > 215: * By convention, the returned object should be obtained by calling > 216: * {@code super.clone}. If a class and all of its superclasses > (except Note this convention is unrealistic for value objects - I recall we discussed about this with Dan Smith participating, forgot if we reached any conclusion about actions to take. test/jdk/java/lang/Object/ValueObjects.java line 127: > 125: System.gc(); > 126: // latch should not count down > 127: assertFalse(latch.await(1, TimeUnit.SECONDS)); 1 second is too long for a tier 1 test I think; we should also use Utils.adjustTimeout to respect jtreg timeouts. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2588#discussion_r3484888381 PR Review Comment: https://git.openjdk.org/valhalla/pull/2588#discussion_r3492936629
