Re: Seeking Review [1472-CCRequiredAttribute]

From: Andy Schwartz <>
Date: Mon, 4 Jan 2010 17:10:35 -0500

On Mon, Jan 4, 2010 at 4:11 PM, Jim Driscoll <> wrote:
> 2) I don't know offhand what Exception I'd pick to throw, but I'm sure that
> IOException isn't the one I'd choose.  IllegalStateException is probably
> better... though there's probably a better one still that I haven't thought
> of.

Maybe javax.faces.view.facelets.TagException?

I noticed that the check for the presence of the required facet is
checking the attribute map (calling attrs.containsKey(key)) instead of
checking the facet map (by calling getFacet(key)). Is this

Oh, also... It looks like it is possible that the previous value for
the "required" variable may survive across loop iterations. That is,
say the first attribute has required="true" and the value for the
attribute is properly specified. We move onto the next iteration of
the loop. The next attribute does not specify required metadata.
Won't the "required" variable still be true when we hit the "if
(required)" block?