cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vgritse...@hns.com>
Subject [PATCH][EXCALIBUR] ComponentManager.release() have bug?
Date Wed, 20 Jun 2001 16:09:46 GMT
Hello,

I think I found something which looks like bug in Excalibur code,
in ExcaliburComponentManager. This was hard to track down, but here it is...

In lookup(), if handler is not there it goes to parent component manager.
But in release(), it does not releases components to parent. Is it a bug or not?

Code snippet:
--------------------------------
    public void release(Component component)
    {
        if(null == component)
            return;
        ComponentHandler handler = (ComponentHandler)m_componentMapping.get(component);

        if(null != handler){
            try{
                handler.put(component);
            }catch(Exception e){
                getLogger().debug("Error trying to release component.", e);
            }
            m_componentMapping.remove(component);
        }
    }
--------------------------------
Suggested fix:
--------------------------------
    public void release(Component component)
    {
        if(null == component)
            return;
        ComponentHandler handler = (ComponentHandler)m_componentMapping.get(component);

        if(null != handler){
            try{
                handler.put(component);
            }catch(Exception e){
                getLogger().debug("Error trying to release component.", e);
            }
            m_componentMapping.remove(component);
        }else if(m_parentManager != null){
           	m_parentManager.release(component);
        }
    }
--------------------------------

Thanks,
Vadim

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


Mime
View raw message