classpathx-xml
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Classpathx-xml] More on GCJ compilation


From: Nic Ferrier
Subject: [Classpathx-xml] More on GCJ compilation
Date: 21 Apr 2002 03:08:55 +0100

Nic reported this:
> ./source/gnu/xml/dom/DomNsNode.java:137: No method named `getNodeType' in 
> scope. 
>        if (namespace != null || getNodeType () != ATTRIBUTE_NODE) 
>                                         ^ 
 
David said:
>Are you compiling from CVS or what?  The version I happen to 
>have on this system clearly has such a method in the base class 
>(returns a short).  But I also thought I'd ripped that method out 
>and made it go back to a static field... 

Ok. This is the fresh source code from CVS. It does not compile with
GCJ but it does compile with javac.

The class: gnu.xml.dom.DomNSNode does make a reference to
getNodeType().

The method is actually declared in the interface org.w3c.dom.Node and
implemented in the classes:

gnu.xml.dom.DomAttr
gnu.xml.dom.DomCDATA
gnu.xml.dom.DomComment
gnu.xml.dom.DomDoctype
gnu.xml.dom.DomDocument
gnu.xml.dom.DomElement
gnu.xml.dom.DomEntity
gnu.xml.dom.DomEntityReference
gnu.xml.dom.DomFragment
gnu.xml.dom.DomNotation
gnu.xml.dom.DomPI
gnu.xml.dom.DomText

And these are all sub-classes of either DomNode or DomNSNode. 

So the problem is that GCJ is not understanding that the method is
abstract. That will need to be fixed and I'll try and report that to
the GCJ team, in the mean time however, adding the following to the
DomNode class will cause things to compile:


  /** This forces GCJ compatibility.
   */
  public abstract short getNodeType ();

Can I check in that fix to JAXP please?


Nic




reply via email to

[Prev in Thread] Current Thread [Next in Thread]