PatternSet's toString gives NPE
-------------------------------
Key: JELLY-202
URL: http://issues.apache.org/jira/browse/JELLY-202
Project: jelly
Type: Bug
Components: taglib.ant
Versions: 1.0
Reporter: Paul Libbrecht
When the logging-level is set to Debug and
org.apache.commons.jelly.tags.ant.AntTag is setting properties (actually,
before setting the properties) on the ant-tag, the following is attempted:
log.debug( "Setting bean property on: "+ object + " name: " + name + " value:
" + value );
which fails with a null-pointer for the following reason which I partially
share:
The toString of object is invoked and, if this one is a
org.apache.tools.ant.types.PatternSet (or its inner class), it throws because
the name is not set yet. It's not set yet because it's going to be set !
I considered this as a bug, to me, toString() should never throw.
Jelly-Ant's ant version is a bit old so I hoped a later version of Ant fixes
this. By no means!
In todays snapshot, one can see the following:
if (name == null) {
throw new BuildException(
"Missing attribute \"name\" for a pattern");
}
I'd propose, thus, to remove the object from the debug line above until we
manage to convince anters and we upgrade.
log.debug( "Setting bean property on name: " + name + " value: " + value );
paul
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]