DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=37061>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=37061 Summary: BSFManager.undeclareBean undeclares wrong bean Product: BSF Version: 2.3.0-rc1 Platform: All OS/Version: other Status: NEW Severity: normal Priority: P2 Component: framework AssignedTo: bsf-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] For the code (direct from SVN) --------------------- BSFDeclaredBean tempBean = null; for (int i = 0; i < declaredBeans.size(); i++) { tempBean = (BSFDeclaredBean) declaredBeans.elementAt(i); if (tempBean.name.equals(beanName)) { break; } } if (tempBean != null) { ---------------------- If "declaredBeans" is non-empty, but no bean exists with "beanName", then after the for loop, "tempBean" will point to the last valid bean in the list, and will *not* be null. Thus, attempting to undeclare a bean that was never declared, will actually undeclare an unrelated bean. The javadoc states: "Quietly returns if the bean is unknown." Well, I guess it's "quiet", but it's probably not what the author intended :) -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]