https://issues.apache.org/bugzilla/show_bug.cgi?id=56593
Bug ID: 56593
Summary: NullPointerException occurs whenever Java cannot
resolve local host
Product: Ant
Version: 1.9.4
Hardware: Macintosh
Status: NEW
Severity: normal
Priority: P2
Component: Core tasks
Assignee: [email protected]
Reporter: [email protected]
Created attachment 31689
--> https://issues.apache.org/bugzilla/attachment.cgi?id=31689&action=edit
Patch to fix the NullPointerException in getLocalHost
This occurs when running the junit task in ant. Whenever Java cannot seem to
resolve localhost(i.e. InetAddress.getLocalHost() returns null) a
NullPointerException is generated and the build fails(crashes) if run in forked
mode. See
http://stackoverflow.com/questions/24053861/ant-getting-nullpointerexception-after-tests?noredirect=1#comment37088009_24053861
for more information.
I have attached a patch file as a fix, this basically just performs a null
check on getLocalHost and if it is null return "localhost" as the host name.
--
You are receiving this mail because:
You are the assignee for the bug.