Integrated: 8297822: De-duplicate code in module jdk.sctp

Per Minborg pminborg at openjdk.org
Mon Dec 12 13:37:52 UTC 2022


On Wed, 30 Nov 2022 16:54:02 GMT, Per Minborg <pminborg at openjdk.org> wrote:

> This PR proposes merging logic and optimising three classes that exist for aix, macos and windows.
> 
> Optimisation will reduce byte code. Below is an example for one of the many methods optimised.
> 
> Before:
> 
> public void implCloseSelectableChannel() throws java.io.IOException;
>   Code:
>      0: new           #7                  // class java/lang/UnsupportedOperationException
>      3: dup
>      4: ldc           #11                 // String SCTP not supported on this platform
>      6: invokespecial #13                 // Method java/lang/UnsupportedOperationException."<init>":(Ljava/lang/String;)V
>      9: athrow
> 
> 
> After:
> 
> public void implCloseSelectableChannel() throws java.io.IOException;
>   Code:
>      0: invokestatic  #16                 // Method sun/nio/ch/sctp/UnsupportedUtil.sctpUnsupported:()Ljava/lang/UnsupportedOperationException;
>      3: athrow

This pull request has now been integrated.

Changeset: 56c438bf
Author:    Per Minborg <pminborg at openjdk.org>
Committer: Daniel Fuchs <dfuchs at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/56c438bfc278307ec1f97dfba60253ae6b64df44
Stats:     1596 lines in 14 files changed: 429 ins; 1167 del; 0 mod

8297822: De-duplicate code in module jdk.sctp

Reviewed-by: dfuchs, rriggs

-------------

PR: https://git.openjdk.org/jdk/pull/11436


More information about the net-dev mailing list