Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 81393 invoked by uid 500); 20 Jun 2001 16:10:26 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 80963 invoked from network); 20 Jun 2001 16:10:20 -0000 From: "Vadim Gritsenko" To: "Cocoon Developers" Subject: [PATCH][EXCALIBUR] ComponentManager.release() have bug? Date: Wed, 20 Jun 2001 12:09:46 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Importance: Normal X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N 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