You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2009/08/02 20:42:48 UTC
DO NOT REPLY [Bug 47623] New: Task.log(Throwable, int) throws
NullPointerException on messageless exceptions
https://issues.apache.org/bugzilla/show_bug.cgi?id=47623
Summary: Task.log(Throwable, int) throws NullPointerException
on messageless exceptions
Product: Ant
Version: 1.7.1
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P2
Component: Core
AssignedTo: notifications@ant.apache.org
ReportedBy: tomer+asf+bugzilla@tomergabel.com
While creating a custom task I've found that logging a Throwable with no
message will cause a NullPointerException. This is caused because
Task.log(Throwable, int) forwards the error message to Project.log(Task,
String, Throwable, int) which does not support null messages.
To reproduce:
public class Example extends Task {
@Override
public final void execute() throws BuildException {
final Throwable t = new Exception();
this.log( t, Project.MSG_ERR );
}
}
Suggested behavior: either modify API to throw IllegalArgumentException with a
messageless Throwable, or (preferably) modify error message mangling to support
nulls.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 47623] Task.log(Throwable, int) throws
NullPointerException on messageless exceptions
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47623
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |1.8.0
--- Comment #1 from Stefan Bodewig <bo...@apache.org> 2009-08-03 22:39:34 PDT ---
fixed in svn revision 800678
Thanks
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.