On Tue, 29 Nov 2022 17:08:50 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:
>> This PR proposes a variety of modernisations to the `jdk.sctp` module. >> >> During the fix of https://bugs.openjdk.org/browse/JDK-8296024, several >> improvement areas were identified including: >> >> * Replacing duplicate code segments >> * Making certain fields final >> * Using enhanced switch >> * Using records >> * Fixing typos >> * Marking fields participating in serialisation with `@Serial` >> * Modernizing toString() implementations >> * Using pattern matching >> * Using diamond operators > > src/jdk.sctp/share/classes/sun/nio/ch/sctp/SctpStdSocketOption.java line 32: > >> 30: public record SctpStdSocketOption<T>(String name, >> 31: Class<T> type, >> 32: int constValue) > > This changes the implementation of `toString`, `equals` and `hashCode`. Have > you verified that it is OK to do so? I agree this might be an issue. Especially `toString` in this case might be problematic. I think the best course of action here would be to revert the changes proposed. ------------- PR: https://git.openjdk.org/jdk/pull/11418