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

Attachment: smime.p7s
Description: S/MIME cryptographic signature



Reply via email to