RFR: 8297822: De-duplicate code in module jdk.sctp [v2]

Per Minborg pminborg at openjdk.org
Thu Dec 1 09:24:44 UTC 2022


> This PR proposes merging logic and optimising three classes that exist for aix, maces 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

Per Minborg has updated the pull request incrementally with one additional commit since the last revision:

  Fix copyrignt and add sealed classes

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/11436/files
  - new: https://git.openjdk.org/jdk/pull/11436/files/fcecbc48..b73819f3

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=11436&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11436&range=00-01

  Stats: 51 lines in 16 files changed: 31 ins; 0 del; 20 mod
  Patch: https://git.openjdk.org/jdk/pull/11436.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11436/head:pull/11436

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


More information about the net-dev mailing list