org.apache.axiom.util.stax.debug
Class UnclosedReaderDetector
java.lang.Object
javax.xml.stream.XMLInputFactory
org.apache.axiom.util.stax.wrapper.XMLInputFactoryWrapper
org.apache.axiom.util.stax.wrapper.WrappingXMLInputFactory
org.apache.axiom.util.stax.debug.UnclosedReaderDetector
public class UnclosedReaderDetector
- extends WrappingXMLInputFactory
XMLInputFactory
wrapper that enabled detection of unclosed stream readers. An unclosed
reader will be detected when the XMLStreamReader
instance is finalized by the virtual
machine. When this happens, a warning message will be logged. The log message contains the stack
trace of the instruction that created the reader.
Note that for this to work, the detector must compute the stack trace every time a reader is
created. Since this may have a significant performance impact, the wrapper should only used
during testing and debugging.
Methods inherited from class org.apache.axiom.util.stax.wrapper.WrappingXMLInputFactory |
createFilteredReader, createFilteredReader, createXMLEventReader, createXMLEventReader, createXMLEventReader, createXMLEventReader, createXMLEventReader, createXMLEventReader, createXMLEventReader, createXMLStreamReader, createXMLStreamReader, createXMLStreamReader, createXMLStreamReader, createXMLStreamReader, createXMLStreamReader, wrap |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UnclosedReaderDetector
public UnclosedReaderDetector(XMLInputFactory parent)
- Constructor.
- Parameters:
parent
- the parent factory
wrap
protected XMLStreamReader wrap(XMLStreamReader reader)
- Description copied from class:
WrappingXMLInputFactory
- Wrap a reader created from this factory. Implementations should override this method if they
which to wrap
XMLStreamReader
instances created from the factory. The default
implementation simply returns the unwrapped reader.
- Overrides:
wrap
in class WrappingXMLInputFactory
- Parameters:
reader
- the reader to wrap
- Returns:
- the wrapped reader
Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.