[jdom-commits] CVS update: jdom/src/java/org/jdom

jhunter at cvs.jdom.org jhunter at cvs.jdom.org
Sun Oct 7 12:07:52 PDT 2001

Date:	Sunday October 7, 2001 @ 20:07
Author:	jhunter

Update of /home/cvspublic/jdom/src/java/org/jdom
In directory www.nmemonix.com:/tmp/cvs-serv7824

Modified Files:
Log Message:
Bug fix from Jools:

A bug exists in Document.java where a ProcessingInstruction can be
from a Document but the parentage is not set to null, should it be

Attached is a demonstraction of the bug (DocBug.java) and a diff which
will fix the problem taken against the current version in CVS.


import org.jdom.Element;
import org.jdom.Document;
import org.jdom.ProcessingInstruction;

public class DocBug {

        public static void main(String[] args) {
                Document doc = new Document(new Element("bug"));

                ProcessingInstruction foo = new ProcessingInstruction("foo", "data");
                // Adding sets the parent.

                // Removing __should__ set the parent to null.
                // This should not throw an exception.

File: no file Document.java		Status: Needs Checkout

   Working revision:	1.45	Sun Oct  7 19:07:52 2001
   Repository revision:	1.45	/home/cvspublic/jdom/src/java/org/jdom/Document.java,v

   Existing Tags:
	jdom_1_0_b7              	(revision: 1.44)
	jdom_1_0_b6              	(revision: 1.25)
	start                    	(revision:
	jdom                     	(branch: 1.1.1)

More information about the jdom-commits mailing list