>>>>> "Craig" == Craig R McClanahan <[EMAIL PROTECTED]> writes:
>> I would rather avoid even having a private init() method -- I'd rather see
>> us initialize all String-valued attributes to null in their declarations
>> and in the reset() methods. Any place in the code we've previously
>> depended on the default value should do explicit checks for null and
>> modify their behavior accordingly.
>>
>> > Do you have a good example of your other statement, about modifying the
>> > specified attribute values in the tag methods? I may have seen that, but I
>> > want to be sure I know what you're referring to.
>>
>> I've fixed them as I've seen them, so don't know of any offhand -- but I
>> would review the most complicated tags like <html:form> first. If you see
>> something like "this.foo = ..." in a tag's doStartTag() or doEndTag()
>> method, that is a danger sign.
I guess I'll file a report if I see a case like that.
The MessageTag class is an interesting case. It inits "bundle" and "locale" to
null, but sets them to non-null values in "release()". The references to them,
in "doStartTag()" (which don't use the accessor methods, by the way), don't
check for null. However, the method that it sends them to,
"RequestUtils.message()", does check for null.
There's probably lots of cases like this that still work, even though
"release()" leaves them in a different state than initial construction.
--
===================================================================
David M. Karr ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>