Vadim Gritsenko wrote:
>
> 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?
This is a bug. Thank you for finding it. I have patched the Avalon source code.
>
> 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: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
S/MIME Cryptographic Signature