RFR: 8297778: Modernize and improve module jdk.sctp [v5]
Sergey Tsypanov
stsypanov at openjdk.org
Thu Dec 1 10:04:40 UTC 2022
On Wed, 30 Nov 2022 18:34:15 GMT, Per Minborg <pminborg at 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
>
> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
>
> Minor updates
src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpStandardSocketOptions.java line 53:
> 51: public static final SctpSocketOption<Boolean> SCTP_DISABLE_FRAGMENTS = new
> 52: SctpStdSocketOption<>("SCTP_DISABLE_FRAGMENTS", Boolean.class,
> 53: sun.nio.ch.sctp.SctpStdSocketOption.SCTP_DISABLE_FRAGMENTS);
I guess you don't need fully qualified import for `sun.nio.ch.sctp.SctpStdSocketOption` as it is already imported in this class
-------------
PR: https://git.openjdk.org/jdk/pull/11418
More information about the net-dev
mailing list