* we override the leafNode behavior for error-info.
*/
abstract class StreamWriterWithDisabledValidation extends ForwardingNormalizedNodeStreamWriter {
-
private final QName excludedQName;
+
private boolean inOurLeaf;
/**
}
@Override
- public void startLeafNode(final NodeIdentifier name) throws IOException {
+ public final void startLeafNode(final NodeIdentifier name) throws IOException {
if (name.getNodeType().equals(excludedQName)) {
inOurLeaf = true;
startLeafNodeWithDisabledValidation(name);
abstract void startLeafNodeWithDisabledValidation(NodeIdentifier nodeIdentifier) throws IOException;
@Override
- public void scalarValue(final Object value) throws IOException {
+ public final void scalarValue(final Object value) throws IOException {
if (inOurLeaf) {
scalarValueWithDisabledValidation(value);
} else {
abstract void scalarValueWithDisabledValidation(Object value) throws IOException;
@Override
- public void endNode() throws IOException {
+ public final void endNode() throws IOException {
if (inOurLeaf) {
inOurLeaf = false;
endNodeWithDisabledValidation();