[jdk17u-dev] RFR: 8286781: Replace the deprecated/obsolete gethostbyname and inet_addr calls

fitzsim duke at openjdk.org
Tue May 21 15:57:34 UTC 2024


I propose backporting the fix for `8286781` to `jdk17u`.

I tested the changes on `jdk17u-dev` `master`, on `Fedora 38` `x86-64`, `slowdebug` and `fastdebug` configurations.  The test was to run `IdealGraphVisualizer`, per `jdk17u-dev/src/utils/IdealGraphVisualizer/README.md`, then run, e.g.:


./build/linux-x86_64-server-fastdebug/jdk/bin/java -XX:+PrintIdealGraph -XX:PrintIdealGraphLevel=1 -classpath ~/source/hello-java Hello


I needed extra JVM arguments in `jdk17u-dev/src/utils/IdealGraphVisualizer/application/target/idealgraphvisualizer/bin/idealgraphvisualizer` to make the visualizer utility work on 17:


            --jdkhome '"$jdkhome"' \
            -J--add-opens=java.base/java.net=ALL-UNNAMED \
            -J--add-opens=java.base/java.security=ALL-UNNAMED \
            -J--add-opens=java.base/java.lang=ALL-UNNAMED \
            -J--add-opens=java.desktop/sun.awt=ALL-UNNAMED \
            -J--add-opens=java.desktop/javax.swing.plaf.synth=ALL-UNNAMED \
            -J--add-opens=java.desktop/javax.swing=ALL-UNNAMED \
            -J--add-exports=java.desktop/com.sun.java.swing.plaf.gtk=ALL-UNNAMED \
            --clusters '"$clusters"' \


Networking between the test and the utility worked fine with the backport applied.

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

Commit messages:
 - 8286781: Replace the deprecated/obsolete gethostbyname and inet_addr calls

Changes: https://git.openjdk.org/jdk17u-dev/pull/2487/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=2487&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8286781
  Stats: 39 lines in 5 files changed: 13 ins; 16 del; 10 mod
  Patch: https://git.openjdk.org/jdk17u-dev/pull/2487.diff
  Fetch: git fetch https://git.openjdk.org/jdk17u-dev.git pull/2487/head:pull/2487

PR: https://git.openjdk.org/jdk17u-dev/pull/2487


More information about the jdk-updates-dev mailing list