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

InetAddress.getAllByName is broken

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2
    • 1.0
    • 1.0
    • tools
    • 1.0beta
    • sparc
    • solaris_2.4
    • Not verified

    Description

      InetAddress.getAllByName is broken. I get the following error
      when I call it:

      Java.lang.ClassCastException java.net.InetAddress
              at java.net.InetAddress.getAllByName(InetAddress.java)
              at java_net_InetAddress_methods.main(java_net_InetAddress_methods.java:13)

      Test Case:
      class java_net_InetAddress_methods {
              public static void main (String args[]) {

                      InetAddress y1 = InetAddress.getByName("tachyon");
                      InetAddress y2 = InetAddress.getByName("makeda");
                      InetAddress y3 = InetAddress.getByName("tachyon");
                      InetAddress y4[] = InetAddress.getAllByName("tachyon");
                      Properties p = new Properties();
                      p.put("MYVAR","VAL");
                      System.setProperties(p);


                      System.out.print("y1.equals(y2) " + y1.equals(y2) + " \\n");
                      System.out.print("y1.equals(y3) " + y1.equals(y3) + " \\n");

                      System.out.print("y1.getAddress() " + y1.getAddress() + " \\n");


      // System.out.print("y1.getAllByName(java.sun.com) " + y4[0].toString
      () + " \\n");
       

                      System.out.print("y1.getHostName() " + y1.getHostName() + " \\n");

                      System.out.print("y1.getLocalHost() " + y1.getLocalHost() + " \\n")
      ;

                      System.out.print("y1.hashCode() " + y1.hashCode() + " \\n");

                      System.out.print("y1.toString() " + y1.toString() + " \\n");

              }
      }

      Attachments

        Issue Links

          Activity

            People

              duke J. Duke
              hwilliamsunw Headley Williamson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: