Iwao, It is fixed now. You were correct, the InputOptionsCollectionTag was reusing an InputOptionTag and expecting attributes to remain the same between uses which was changed with rev 865.
Aaron Iwao AVE! wrote: > Hi, > > I think this check-in causes NPE when a JSP contains > <options-enumeration/> tag. > Could somebody confirm it? > > - Stack Trace > Caused by: java.lang.NullPointerException > at > net.sourceforge.stripes.tag.StripesTagSupport.getTagStack(StripesTagSupport.java:163) > at > net.sourceforge.stripes.tag.InputTagSupport.doStartTag(InputTagSupport.java:391) > at > net.sourceforge.stripes.tag.InputOptionsCollectionTag.doEndTag(InputOptionsCollectionTag.java:320) > ... > > - Tested on: > Mac OS X 10.4.11 / Java 1.5.0_13 / Jetty 6.1.5, Tomcat 5.5.26 > > // Iwao AVE! > > [EMAIL PROTECTED] wrote on 08.2.27 10:22 AM: > >> Revision: 865 >> http://stripes.svn.sourceforge.net/stripes/?rev=865&view=rev >> Author: mongus >> Date: 2008-02-26 17:22:35 -0800 (Tue, 26 Feb 2008) >> >> Log Message: >> ----------- >> Tag reuse by a servlet container within the same form was causing attributes >> set in one tag to show up in following tags. The code now calls release >> after the tag is rendered to clear it out. >> >> Modified Paths: >> -------------- >> trunk/stripes/src/net/sourceforge/stripes/tag/FieldMetadataTag.java >> trunk/stripes/src/net/sourceforge/stripes/tag/InputTagSupport.java >> >> Modified: trunk/stripes/src/net/sourceforge/stripes/tag/FieldMetadataTag.java >> =================================================================== >> --- trunk/stripes/src/net/sourceforge/stripes/tag/FieldMetadataTag.java >> 2008-02-26 01:06:05 UTC (rev 864) >> +++ trunk/stripes/src/net/sourceforge/stripes/tag/FieldMetadataTag.java >> 2008-02-27 01:22:35 UTC (rev 865) >> @@ -397,4 +397,15 @@ >> return formId; >> } >> } >> + >> + /** Release method to clean up the state of the tag to prepare it for >> re-use. */ >> + @Override >> + public void release() { >> + // Because the type attribute is set in the constructor and >> + // the attributes are cleared we need to save the type and >> + // replace it after calling super.release(). >> + String type = getAttributes().get("type"); >> + super.release(); >> + getAttributes().put("type", type); >> + } >> } >> >> Modified: trunk/stripes/src/net/sourceforge/stripes/tag/InputTagSupport.java >> =================================================================== >> --- trunk/stripes/src/net/sourceforge/stripes/tag/InputTagSupport.java >> 2008-02-26 01:06:05 UTC (rev 864) >> +++ trunk/stripes/src/net/sourceforge/stripes/tag/InputTagSupport.java >> 2008-02-27 01:22:35 UTC (rev 865) >> @@ -438,13 +438,26 @@ >> return result; >> } >> finally { >> - this.errorRenderer = null; >> - this.fieldErrors = null; >> - this.fieldErrorsLoaded = false; >> - this.focus = false; >> + this.release(); >> } >> } >> + >> + /** Release method to clean up the state of the tag ready for re-use. */ >> + @Override >> + public void release() { >> + this.errorRenderer = null; >> + this.fieldErrors = null; >> + this.fieldErrorsLoaded = false; >> + this.focus = false; >> >> + // Because the type attribute is set in the constructor and >> + // the attributes are cleared we need to save the type and >> + // replace it after calling super.release(). >> + String type = getAttributes().get("type"); >> + super.release(); >> + getAttributes().put("type", type); >> + } >> + >> /** Rethrows the passed in throwable in all cases. */ >> public void doCatch(Throwable throwable) throws Throwable { throw >> throwable; } >> >> >> >> This was sent by the SourceForge.net collaborative development platform, the >> world's largest Open Source development site. >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2008. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Stripes-development mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/stripes-development >> > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Stripes-development mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/stripes-development > > > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Stripes-development mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-development
