Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7900206

jtreg should report "localhost" instead of "unknown"

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • None
    • None
    • tools
    • None

      From http://mail.openjdk.java.net/pipermail/jtreg-use/2013-July/000217.html
      >
      > >Regarding the hostname, jtreg is executing the following code for all
      > >tests, not just java.io tests
      > >
      > > String hostname;
      > > try {
      > > hostname =
      > >InetAddress.getLocalHost().getCanonicalHostName();
      > > } catch (UnknownHostException e) {
      > > hostname = "unknown";
      > > }
      >
      > To be more graceful you could return "localhost" or "127.0.0.1".
      I agree, there are slew of reasons why it may not be possible to get the
      canonical host name so a fallback to use the loopback would be much better.

      -Alan.

            jjg Jonathan Gibbons
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: