RFR: 8297778: Modernize and improve module jdk.sctp [v2]
Alan Bateman
alanb at openjdk.org
Wed Nov 30 09:36:23 UTC 2022
On Wed, 30 Nov 2022 09:22:00 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:
>
> Revert dedup and align switch cases
src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpStandardSocketOptions.java line 37:
> 35: * @since 1.7
> 36: */
> 37: public final class SctpStandardSocketOptions {
com.sun.nio.sctp.SctpStandardSocketOptions is a JDK-specific API so technically changing it to final is an API change, although with no consequence as there is no accessible constructor.
-------------
PR: https://git.openjdk.org/jdk/pull/11418
More information about the security-dev
mailing list