[jdom-commits] CVS Update: jdom/src/java/org/jdom
Jason Hunter
jhunter at servlets.kattare.com
Thu Nov 16 01:22:49 PST 2006
****************************************
Date: Thu Nov 16, 2006 @01:22:49 PST
Author:
Update of /home/cvs/jdom/src/java/org/jdom
In directory servlets:/tmp/cvs-serv12774
Modified Files:
ContentList.java
Log Message:
Allow a String to ContentList.add(int, Object). Solves inconvenience
reported by Syloke Soong.
Syloke Soong wrote:
> JDOM javadoc says,
>
> [javadoc]
> Element addContent(java.util.Collection collection) Appends all children in the given collection to the end of the content
> list.
>
> Element addContent(int index, java.util.Collection c) Inserts the content in a collection into the content list at the given
> index.
>
> Element addContent(java.lang.String str) This adds text content to this element.
> [/javadoc]
>
> Since you could add individual String, I presumed no harm would come my
> way if String objects are included in the collection argument.
>
> But no, I had a Vector with a String object and addContent(collection)
> rejected the vector due to ...
>
> org.jdom.IllegalAddException: Class java.lang.String is of unrecognized
> type and cannot be added
> org.jdom.ContentList.add(ContentList.java:142)
> org.jdom.ContentList.addAll(ContentList.java:292)
> org.jdom.ContentList.clearAndSet(ContentList.java:338)
> org.jdom.Element.setContent(Element.java:742)
>
>
> Hrrrmmmmpppphhhhhhhh .... !
-jh-
===================================================================
File: no file ContentList.java Status: Needs Checkout
Working revision: 1.40 Thu Nov 16 09:22:49 2006
Repository revision: 1.40 /home/cvs/jdom/src/java/org/jdom/ContentList.java,v
Existing Tags:
jdom_1_0 (revision: 1.39)
jdom_1_0_rc1 (revision: 1.39)
BEFORE_UNCHECKED (revision: 1.38)
jdom_1_0_b10 (revision: 1.36)
jdom_1_0_b10_rc1 (revision: 1.34)
after_rolf (revision: 1.32)
before_rolf (revision: 1.31)
jdom_1_0_b9 (revision: 1.21)
jdom_1_0_b8 (revision: 1.11)
More information about the jdom-commits
mailing list