ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 38458] - [PATCH] NullPointerException thrown in Task.log() if setProject() has not been called
Date Thu, 02 Feb 2006 06:45:39 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38458>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38458





------- Additional Comments From amross@stagingconnections.com  2006-02-02 07:45 -------

> Hmm... at first I was like, what?  But if there were a static 
> Project.DEFAULT_INSTANCE Project, whose only properties were System properties, 
> etc... hmmm...

I am totally not familiar with the Ant codebase, but...
I was thinking the constructor would just do a 

setProject(new Project());

instead of me having to mutter the mystical incantation

XSLTProcess process=new XSLTProcess();
process.setProject(new Project());

which is what I am doing now to get things working. Or as you suggest it could
use a static Project instance, if that works better.

It just seems to me that either
1) Every Task has a Project, in which case the Task class should enforce that 
or
2) a Project is optional, and subclasses of Task should not assume there is one.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message