On Mon, 18 May 2026 18:21:47 GMT, Chen Liang <[email protected]> wrote:
>> For preview of the serialization implementation cleanup. >> >> See the mainline diff version: >> https://gist.github.com/a3440f2b9da5111fe20315e59ed17380 >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Chen Liang has updated the pull request incrementally with one additional > commit since the last revision: > > Message updated src/java.base/share/classes/java/io/ObjectInputStream.java line 2243: > 2241: * the exit of {@link #readObject(Class)}. > 2242: */ > 2243: private Object readRecordOrValue(ObjectStreamClass desc, boolean > isRecord) throws IOException { My preference would be to introduce a readValue instead of passing around a boolean to indicate whether record or value. src/java.base/share/classes/java/io/ObjectStreamClass.java line 126: > 124: private boolean isRecord; > 125: /** true if represents a value class */ > 126: private boolean isValueOrStrictInit; The comment reads one thing but the name of the field tells a slightly different story. If we need to differentiate "value or strict init" in the variable name, then it would make sense to explain in the comment. src/java.base/share/classes/java/io/ObjectStreamClass.java line 197: > 195: private MethodHandle deserializationCtr; > 196: /** value deserialization method identified by {@link > DeserializeConstructor}.*/ > 197: private Executable deserializeConstructor; These two fields seems confusingly similarly named, possible to differentiate the names a bit for clarity? ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2326#discussion_r3355575417 PR Review Comment: https://git.openjdk.org/valhalla/pull/2326#discussion_r3355589363 PR Review Comment: https://git.openjdk.org/valhalla/pull/2326#discussion_r3355583622
