JDK-4239141 : A warning should be added to the use of toString in INetAddress
  • Type: Bug
  • Component: docs
  • Sub-Component: guides
  • Affected Version: 1.2.1,1.3.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 1999-05-18
  • Updated: 2000-11-18
  • Resolved: 2000-11-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
Other
1.4.0 betaFixed
Related Reports
Duplicate :  
Description

Name: vi73552			Date: 05/18/99


When you create an INetAddress via getByName(), and then subsequently make a call to toString() there is normally no problems.  But if the network is down then that call to toString() will result in a major delay to the application (due to the hostName being null in that INetAddress instance).

We have spent an awful long time tracking this down and did not expect to find that the cause of our problem was the normally innocuous toString method.
(Review ID: 83189) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: generic FIXED IN: merlin-beta INTEGRATED IN: merlin-beta
2004-06-14

WORK AROUND Name: vi73552 Date: 05/18/99 What we have done is place the code doing the toString always in another thread, regardless of network presence. It just means a short delay in getting the info we like. ======================================================================
2004-06-11

PUBLIC COMMENTS The engineer responsible for this class has fixed the bug mentioned in this bug report. jamie.ho@Eng 2000-08-24
2000-08-24

EVALUATION We decided that it's inappropriate for toString to do a DNS lookup when hostName is null. If hostName is null, we will print an empty string for the hostname part. This is the behaviour in jdk1.0. yingxian.wang@eng 2000-08-23
2000-08-23