commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Libbrecht (JIRA)" <>
Subject [jira] Created: (JELLY-202) PatternSet's toString gives NPE
Date Wed, 16 Feb 2005 09:55:44 GMT
PatternSet's toString gives NPE

         Key: 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
(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 );


This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
If you want more information on JIRA, or have a bug to report see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message