Fix for compiling DOM-Test-Suite with jdk-sun-1.2.2 + next problem.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

The patch below was necessary, otherwise javac wouldn't compile those 2 files,
since a final object has to initialized immediately, apparently.

System: Linux Mandrake 8.2, Sun JDK 1.2.2, Jakara-Ant-1.4, xalan-j_2_4_D1,
             2001/DOM-Test-Suite from CVS.
The CLASSPATH contains all the jar files from xalan-j_2_4_D1/bin,
and /usr/jdk-sun1.2.2/lib/tools.jar. Correct? Anything missing?

diff -u -p -r1.1 XercesHTML2DocumentBuilderFactory.java
- --- XercesHTML2DocumentBuilderFactory.java      2002/06/10 04:00:40     1.1
+++ XercesHTML2DocumentBuilderFactory.java      2002/08/27 14:40:04
@@ -28,10 +28,10 @@ import java.lang.reflect.*;
 public class XercesHTML2DocumentBuilderFactory
   extends DOMTestDocumentBuilderFactory {

- -  private final SAXParserFactory factory;
- -  private final Constructor htmlBuilderConstructor;
- -  private final Method getHTMLDocumentMethod;
- -  private final DOMImplementation domImpl;
+  private SAXParserFactory factory;
+  private Constructor htmlBuilderConstructor;
+  private Method getHTMLDocumentMethod;
+  private DOMImplementation domImpl;
   private static final Class[] NO_CLASSES = new Class[0];
   private static final Object[] NO_OBJECTS = new Object[0];

Index: XercesHTMLDocumentBuilderFactory.java
===================================================================
RCS file: /sources/public/2001/DOM-Test-Suite/java/org/w3c/domts/XercesHTMLDocumentBuilderFactory.java,v
retrieving revision 1.1
diff -u -p -r1.1 XercesHTMLDocumentBuilderFactory.java
- --- XercesHTMLDocumentBuilderFactory.java       2002/03/02 08:29:24     1.1
+++ XercesHTMLDocumentBuilderFactory.java       2002/08/27 14:40:04
@@ -28,10 +28,10 @@ import java.lang.reflect.*;
 public class XercesHTMLDocumentBuilderFactory
   extends DOMTestDocumentBuilderFactory {

- -  private final SAXParserFactory factory;
- -  private final Constructor htmlBuilderConstructor;
- -  private final Method getHTMLDocumentMethod;
- -  private final DOMImplementation domImpl;
+  private SAXParserFactory factory;
+  private Constructor htmlBuilderConstructor;
+  private Method getHTMLDocumentMethod;
+  private DOMImplementation domImpl;
   private static final Class[] NO_CLASSES = new Class[0];
   private static final Object[] NO_OBJECTS = new Object[0];


This fixes "ant junit-run" for me.
The next problem happens with "ant dom1-core-jar". Here's the error:

Buildfile: build.xml

init:

common-javac:
    [javac] Compiling 19 source files to /home/dfaure/src/DOMTS/2001/DOM-Test-Suite/build/java
    [javac] Note: 2 files use or override a deprecated API.  Recompile with "-deprecation" for details.
    [javac] 1 warning

dom1-check-spec:

get-dom1:

dom1-init:
    [unzip] Expanding: /home/dfaure/src/DOMTS/2001/DOM-Test-Suite/lib/specs/DOM.zip into /home/dfaure/src/DOMTS/2001/DOM-Test-Suite/lib/specs/Level-1
    [unzip] Expanding: /home/dfaure/src/DOMTS/2001/DOM-Test-Suite/lib/specs/Level-1/xml-source.zip into /home/dfaure/src/DOMTS/2001/DOM-Test-Suite/lib/specs/Level-1
    [patch] patching file /home/dfaure/src/DOMTS/2001/DOM-Test-Suite/lib/specs/Level-1/xml/wd-dom.xml
    [patch] patching file /home/dfaure/src/DOMTS/2001/DOM-Test-Suite/lib/specs/Level-1/xml/definitions/level-one-core/element.xml

dom1-interfaces:
    [style] Processing /home/dfaure/src/DOMTS/2001/DOM-Test-Suite/lib/specs/Level-1/xml/wd-dom.xml to /home/dfaure/src/DOMTS/2001/DOM-Test-Suite/build/dom1-interfaces.xml
    [style] Loading stylesheet /home/dfaure/src/DOMTS/2001/DOM-Test-Suite/transforms/extract.xsl
    [style] Using original entity definition for "<".
    [style] Using original entity definition for ">".
    [style] Using original entity definition for "&".
    [style] Using original entity definition for "'".
    [style] Using original entity definition for """.

dom1-dtd:
    [style] Processing /home/dfaure/src/DOMTS/2001/DOM-Test-Suite/lib/specs/Level-1/xml/wd-dom.xml to /home/dfaure/src/DOMTS/2001/DOM-Test-Suite/build/dom1.dtd
    [style] Loading stylesheet /home/dfaure/src/DOMTS/2001/DOM-Test-Suite/transforms/dom-to-dtd.xsl
    [style] Using original entity definition for "<".
    [style] Using original entity definition for ">".
    [style] Using original entity definition for "&".
    [style] Using original entity definition for "'".
    [style] Using original entity definition for """.
    [style] Failed to process /home/dfaure/src/DOMTS/2001/DOM-Test-Suite/lib/specs/Level-1/xml/wd-dom.xml

BUILD FAILED

/home/dfaure/src/DOMTS/2001/DOM-Test-Suite/build.xml:358: javax.xml.transform.TransformerException: java.lang.NullPointerException

Total time: 16 seconds

Thanks for any help.

- -- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
KOffice-1.2-rc1 is out. ftp://ftp.kde.org/pub/kde/unstable/koffice-1.2-rc1/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9a5FF72KcVAmwbhARAl2RAKCp9BclBQBDpge5onHovZYLrOqf1wCgoFQi
ewmRe3ktxeIyBoxlQ8fR5MU=
=KXM0
-----END PGP SIGNATURE-----

Received on Tuesday, 27 August 2002 10:49:00 UTC