Please look here (AbstractConfiguration)

    public String getValue( final String defaultValue )
    {
        try
        {
            return getValue();
        }
        catch( final ConfigurationException ce )
        {
            return defaultValue;
        }
    }

then look here

    public String getValue() throws ConfigurationException
    {
        if( null != m_value )
        {
            return m_value;
        }
        else
        {
            throw new ConfigurationException( "No value is associated
with the "+
                                              "configuration element \""
+ getName() +
                                              "\" at " + getLocation()
);
        }
    }

Can somebody tell me why we have to:

 1) create three strings
 2) call two methods
 3) create an exception object
 4) throw the exception
 5) and then throw everything away.

in order to resort to the default value?

I understand that getValue() doesn't return null, but this seems utterly
inefficient to me.

Considering that Cocoon calls this method "a lot" no wonder why Cocoon
startup is slow as hell.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<[EMAIL PROTECTED]>                             Friedrich Nietzsche
--------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to