Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8055955

(ch) Remove unnecessary initialization of InetAddress from FileChannel

    XMLWordPrintable

Details

    • b29

    Backports

      Description

        During some recent refactoring, JDK-8025306, an unnecessary initialization of the InetAddress classes was added to the NIO implementation. InetAddress classes only need initialization for network channel types.

        $ cat Test.java
        public class Test {
            public static void main(String[] args) throws Exception {
                java.io.File file = new java.io.File(".");
                java.nio.channels.FileChannel fc = java.nio.channels.FileChannel.open(file.toPath());
            }
        }
        $ javac Test.java
        $ jdk9/build/linux-x86_64-normal-server-release/jdk/bin/java -verbose:class Test| grep InetAddress
        [Loaded java.net.InetAddress from jdk9/build/linux-x86_64-normal-server-release/jdk/modules/java.base] [Loaded java.net.InetAddress$1 from jdk9/build/linux-x86_64-normal-server-release/jdk/modules/java.base] [Loaded java.net.InetAddress$InetAddressHolder from jdk9/build/linux-x86_64-normal-server-release/jdk/modules/java.base]
        [Loaded java.net.InetAddress$Cache from jdk9/build/linux-x86_64-normal-server-release/jdk/modules/java.base]
        [Loaded java.net.InetAddress$Cache$Type from jdk9/build/linux-x86_64-normal-server-release/jdk/modules/java.base]
        [Loaded java.net.InetAddressImplFactory from jdk9/build/linux-x86_64-normal-server-release/jdk/modules/java.base]
        [Loaded java.net.InetAddressImpl from jdk9/build/linux-x86_64-normal-server-release/jdk/modules/java.base]
        [Loaded java.net.InetAddress$2 from jdk9/build/linux-x86_64-normal-server-release/jdk/modules/java.base]

        Attachments

          Issue Links

            Activity

              People

                chegar Chris Hegarty
                chegar Chris Hegarty
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: