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

DNS name service provider doesn't resolve aliases

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.4.0
    • 1.4.0
    • core-libs
    • None
    • rc1
    • generic
    • generic
    • Verified

      In relation to an ftpProxyHost test using scaweb1.sfbay.sun.com,
      an ArrayIndexOutOfBoundsException was first observed in build 79
      due to the switchover to sfbay. If wcscaa.sfbay is used no exception
      was thrown. scaweb1 is alias of wcsaa. Observed on all platforms.

      To reproduce, set properties to enable Java name service provider when
      executing test code:


      $ java -Dsun.net.spi.nameservice.provider.1="dns,sun"
      -Dsun.net.spi.nameservice.domain="sun.com"
      -Dsun.net.spi.nameservice.nameservers="129.145.155.32" Test "scaweb1.sfbay.sun.com"
      l.length = 0
      Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
               at Test.main(Test.java:7)


      $ java -Dsun.net.spi.nameservice.provider.1="dns,sun"
      -Dsun.net.spi.nameservice.domain="sun.com"
      -Dsun.net.spi.nameservice.nameservers="129.145.155.32" Test "wcscaa.sfbay.sun.com"
      l.length = 1
      wcscaa.sfbay.sun.com/129.145.155.40




      public class Test {
           public static void main(String args[]) throws Exception {
      InetAddress[] l = InetAddress.getAllByName(args[0]);
      System.err.println("l.length = " + l.length);
      System.err.println(l[0]);
           }
      }

      Thanks to Jessie!

            jccollet Jean-Christophe Collet (Inactive)
            kpolomsksunw Krystyna Polomski (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: