jtreg should report "localhost" instead of "unknown"

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • None
    • Affects Version/s: None
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: