>From an implementation point of view it is not really an issue. The code in the NodeImpl#serialize(AndConsume) methods is valid, but it will throw an exception if it is invoked on anything else then a DocumentImpl or ElementImpl. Even if in the next major release, we remove these methods from the OMNode interface (and only keep them on the OMContainer interface), we could still leave the code as is in NodeImpl. I agree that one could move that code further down the class hierarchy (e.g. by creating a common superclass for DocumentImpl and ElementImpl). That would probably improve the readability of the code, but there is no issue here.
On the other hand, from the point of view of the code using the Axiom API, you are not supposed to refer directly to the NodeImpl and ElementImpl classes. You would only use the OMNode or OMElement interface. If your code invokes the serialize method on a reference of type OMNode, you will get a deprecation warning (that was the whole purpose of deprecating these methods). If your code uses an OMElement reference, then you should not get a deprecation warning (at least that was the conclusion when I tested this). To summarize, I don't really see how this is affecting you. Andreas On Mon, Aug 2, 2010 at 17:08, Cencio1980 <[email protected]> wrote: > Hi all, > > abstract class org.apache.axiom.om.impl.dom.NodeImpl implements deprecated > methods required from interface org.apache.axiom.om.impl.OMNodeEx. > > Some of those methods (serialize and serializeAndConsume) are deprecated > because: > "This method is not meaningful on a node in general, but only on an {...@link > OMElement}." > > > Now i have a org.apache.axiom.om.impl.dom.ElementImpl instance and it > implements OMElement, but there isn't OMElement's serialize and > serializeAndConsume methods implementation. It use inherit method from > NodeImpl, and they are deprecated... > > > There should be an implementation in > org.apache.axiom.om.impl.dom.ElementImpl of that methods? > > Version used: Axiom 1.2.9 > > Cheers, > Lorenzo >
