Comments inline.

Andreas Brenk wrote:

Just some quick remarks on XMLWriterNamespaceBase:

First, shouldn't incrementNesting() and decrementNesting() be protected
instead of public?
That's reasonable, since they're only intended for use by subclasses and would not appear to be useful externally. I'll make the change.

Second, perhaps the JavaDoc for defineNamespace() (and
undefineNamespace() alike) would be clearer if it were "Report _to
subclass_ that namespace has been defined."
Yes, this should be clearer. I'll make this change as well.

Third, I think it would make sense to declare the IXMLWriter methods
that are implemented by XMLWriterNamespaceBase as "final" so subclasses
cannot override them. If they really wanted to they could implement
IXMLWriter on their own.
I think this makes sense for most of these methods. Sometimes it's convenient to supply a base class implementation of a method while allowing subclasses to override with their own implementations, but that doesn't seem to apply for most of these methods.

And fourth, (in addition to what I just said above) it would be safer if
reset() was final and delegated to e.g. an abstract resetInternal() for
subclass cleanup.
I disagree on this one. The JavaDocs for this method state that subclasses which override it need to call the base class implementation. I'd expect that anyone overriding a method would at least look at the JavaDocs to see what they're supposed to do.

 - Dennis


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to