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

getHostName() of InetAddress changes the InetAddress in merlin build45

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 1.4.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_8

      Description

      After calling getHostName() method of InetAddress class it changes the InetAddress itself . Its coming on Solaris 8 machine with merlin build 45.

      How to reproduce it:


      import java.net.*;
      import java.io.*;

      public class GetIP {


         public static void main(String[] arg)
         {
             try {
          
              InetAddress iadr = InetAddress.getByName(arg[0]);
              System.out.println("inet addr to string : " + iadr);
              System.out.println(" Inet address get Host Name : " + iadr.getHostName());
              System.out.println("inet addr tostring after get host name : " + iadr);
            } catch(Exception exp) {
               System.out.println("exp mesg " + exp.getMessage());
            }
         } // End of main

      }
       
      Output of the above code on execution:

      javacup:/home/va112650/SasTest/net 472 % java GetIP ff15::1234:1234:1234:1234
      inet addr to string : /[ff15::1234:1234:1234:1234]
       Inet address get Host Name : [ff15::1234:1234:1234:1234]
      inet addr tostring after get host name : [ff15::1234:1234:1234:1234]/[ff15::1234:1234:1234:1234]

        Attachments

          Activity

            People

            Assignee:
            ywangsunw Yingxian Wang (Inactive)
            Reporter:
            vakellasunw Venkata Akella (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: