[prev in list] [next in list] [prev in thread] [next in thread]
List: xml-cocoon-dev
Subject: Re: FIXME in IncludeTransformer [Was: Re: Adding Files to Subversion]
From: Pier Fumagalli <pier () betaversion ! org>
Date: 2004-09-28 22:00:37
Message-ID: D497709D-1199-11D9-BE5A-000A95984AEA () betaversion ! org
[Download RAW message or body]
On 28 Sep 2004, at 19:10, Vadim Gritsenko wrote:
> Ok, like Hashtable usage:
>
> + this.x_parameters = new Hashtable();
>
> Instead of HashMap (with default map size):
>
> + this.x_parameters = new HashMap(3);
FUDGE! :-) I blame that on Eclipse's auto-completion! ;-P
> Or, like doing:
>
> + this.x_source = atts.getValue(SRC_ATTRIBUTE);
> + if ((this.x_source == null) || (this.x_source.length() == 0)) {
> + throw new SAXException("Unspecified \"src\" attribute");
>
> When you just defined a constant ;-)
>
> + this.x_source = atts.getValue(SRC_ATTRIBUTE);
> + if ((this.x_source == null) || (this.x_source.length() == 0)) {
> + throw new SAXException("Unspecified \"" + SRC_ATTRIBUTE + "\"
> attribute");
>
> (Same with:
> + throw new SAXException("Unspecified \"name\" attribute");
> )
Yup... That's my mistake!
> I'd also go with null this.x_parameters by default, and creating
> HashMap when necessary, and this.x_parameters = null instead of
> .clear() - saves some cycles in most commonly used scenarios (no
> parameters).
Yep... Agreed!
Patched and committed.
Pier
["smime.p7s" (application/pkcs7-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic