"Quinton McCombs" <[EMAIL PROTECTED]> writes:

>I committed a new class
>(org.apache.turbine.util.template.HtmlPageAttributes) last night but
>there has been no commit message sent to the list yet.  Sometimes they
>take a while, but I just committed another change and that commit
>message was sent.....

Hm. Haven't seen it. Some nits:

if(title == null)
{
    return "";
}

I started to use for this consistently

import org.apache.commons.lang.StringUtils;

if (StringUtils.isEmpty(title))
{ 
  ...
}

And in this special case even

return (StringUtils.isEmtpy(title) ? "" : title;

And If you do 

private Hashtable bodyAttributes;

init()
{
    if(this.bodyAttributes == null)
    {
        this.bodyAttributes = new Hashtable();
    }
    else
    {
        this.bodyAttributes.clear();
    }
}

then you can better do:

private Hashtable bodyAttributes = new Hashtable();

init()
{
    bodyAttributes.clear();
}

I'd like to point out, that I _VERY_ much prefer that public methods
return interface types when possible, so we won't get locked into an
implementation type. We had some trouble with this in the SecurityService. 

So please:

import java.util.Map;

private Map bodyAttributes = new Hashtable();

public Map getBodyAttributes()
{
    return bodyAttributes;
}

And finally, as Hashtable very much sucks performance and fail-fast
wise, I'd use HashMap instead of Hashtable. :-)

        Regards
                Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen       -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH     [EMAIL PROTECTED]

Am Schwabachgrund 22  Fon.: 09131 / 50654-0   [EMAIL PROTECTED]
D-91054 Buckenhof     Fax.: 09131 / 50654-20   

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to