[jdom-commits] CVS update: jdom/src/java/org/jdom
cvs at jools.org
cvs at jools.org
Thu Mar 14 21:29:37 PST 2002
Date: Friday March 15, 2002 @ 0:29
Author: cvs
Update of /home/cvspublic/jdom/src/java/org/jdom
In directory jools.org:/tmp/cvs-serv25366
Modified Files:
ContentList.java AttributeList.java
Log Message:
Patch from Alex Rosen to fix a bug reported by Patrick McFarlane
regarding moving attributes. In Alex's words:
I fixed the problem in AttributeList - one of the remove() methods wasn't
detaching the parent. These patches also contain a couple of very minor
fixes:
- In ContentList, rearranged the instanceof tests to be more in order of
expected frequency (specifically I moved up the check for Text nodes higher
up). May result in a tiny speedup.
- Pet peeve: The argument to AttributeList.removeParent() should *always* be
an Attribute, or else something's very wrong with the JDOM code; we were
checking the object's type (in order to avoid the ClassCastException), but
doing nothing in the error case. This is worse than not checking - it was
making in fail silently. I removed the check, so now it would throw a
ClassCastException. (You could also keep the check and throw a different,
more helpful exception. I've never been a fan of that - this exception would
indicate a serious bug in the JDOM code itself, not the use of JDOM. I don't
know if it's worth the added code and string size...)
-jh-
===================================================================
File: no file ContentList.java Status: Needs Checkout
Working revision: 1.7 Fri Mar 15 05:29:37 2002
Repository revision: 1.7 /home/cvspublic/jdom/src/java/org/jdom/ContentList.java,v
Existing Tags:
jdom_1_0_b8_rc1 (revision: 1.5)
===================================================================
File: no file AttributeList.java Status: Needs Checkout
Working revision: 1.7 Fri Mar 15 05:29:37 2002
Repository revision: 1.7 /home/cvspublic/jdom/src/java/org/jdom/AttributeList.java,v
Existing Tags:
jdom_1_0_b8_rc1 (revision: 1.6)
More information about the jdom-commits
mailing list