Hi; I ran findbugs (http://findbugs.sourceforge.net)
on dom4j and jaxen and got the following list. This reports based on rules so
some of these things are almost certainly false positives. But I’ll bet
some are real bugs. M C Se: Class org.dom4j.bean.BeanAttribute defines
non-transient non-serializable instance field
org.dom4j.bean.BeanAttribute.beanList M C SnVI: org.dom4j.bean.BeanDocumentFactory is
Serializable; consider declaring a serialVersionUID M C SnVI: org.dom4j.bean.BeanElement is Serializable;
consider declaring a serialVersionUID M C Se: Class org.dom4j.datatype.DatatypeDocumentFactory
defines non-transient non-serializable instance field
org.dom4j.datatype.DatatypeDocumentFactory.schemaBuilder M C Se: Class org.dom4j.datatype.DatatypeDocumentFactory
defines non-transient non-serializable instance field
org.dom4j.datatype.DatatypeDocumentFactory.xmlSchemaReader M C NP: Possible null pointer dereference in
org.dom4j.datatype.DatatypeDocumentFactory.createAttribute(org.dom4j.Element,org.dom4j.QName,String)
At DatatypeDocumentFactory.java:[line 120] M C SnVI: org.dom4j.DocumentFactory is Serializable;
consider declaring a serialVersionUID M C UCF: Useless control flow in
org.dom4j.dom.DOMDocumentFactory.getInstance() At
DOMDocumentFactory.java:[line 52] M C RR: org.dom4j.io.aelfred.XmlParser.detectEncoding()
ignores result of java.io.InputStream.read(byte[]) At XmlParser.java:[line
3712] H C RV:
org.dom4j.io.aelfred.XmlParser.pushURL(String,String,String,java.io.Reader,java.io.InputStream,String)
ignores return value of java.lang.String.trim() At XmlParser.java:[line 3628] M C RR: org.dom4j.io.aelfred2.XmlParser.detectEncoding()
ignores result of java.io.InputStream.read(byte[]) At XmlParser.java:[line
3986] H C RV:
org.dom4j.io.aelfred2.XmlParser.pushURL(boolean,String,String[],java.io.Reader,java.io.InputStream,String,boolean)
ignores return value of java.lang.String.trim() At XmlParser.java:[line 3868] M C RCN: Redundant comparison to null in
org.dom4j.io.aelfred2.XmlParser.parseAttribute(String) At XmlParser.java:[line
1132] M P UPM: Private method
org.dom4j.io.aelfred2.XmlParser.parseUntil(String) is never called At
XmlParser.java:[lines 4396-4397] M C CN: Class org.dom4j.io.OutputFormat implements Cloneable
but does not define or use clone method M C RCN: Redundant comparison to null in
org.dom4j.io.SAXHelper.createXMLReader(boolean) At SAXHelper.java:[line 62] H C HE: org.dom4j.rule.Rule defines equals and uses
Object.hashCode() M C SnVI: org.dom4j.swing.XMLTableColumnDefinition is
Serializable; consider declaring a serialVersionUID M M RS: org.dom4j.tree.ConcurrentReaderHashMap's readObject
method is synchronized M C HE: org.dom4j.tree.DefaultNamespace defines equals but
not hashCode M C It: org.dom4j.tree.SingleIterator.next() can't throw
NoSuchElement exception At SingleIterator.java:[lines 34-37] M C ES: Comparison of String objects using == or != in
org.dom4j.util.NodeComparator.compare(String,String) At
NodeComparator.java:[line 262] M C OS:
org.xml.sax.helpers.XMLReaderFactory.createXMLReader() may fail to close stream
At XMLReaderFactory.java:[line 127] M C UCF: Useless control flow in
org.xml.sax.helpers.XMLReaderFactory.createXMLReader() At
XMLReaderFactory.java:[line 137] H C HE:
org.jaxen.saxpath.conformance.ConformanceXPathHandler defines equals and uses
Object.hashCode() M C RC: Suspicious comparison of java.lang.Boolean
references in org.jaxen.expr.DefaultAndExpr.evaluate(org.jaxen.Context) At
DefaultAndExpr.java:[line 182] M C RC: Suspicious comparison of java.lang.Boolean
references in org.jaxen.expr.DefaultOrExpr.evaluate(org.jaxen.Context) At
DefaultOrExpr.java:[line 186] M C It: org.jaxen.xom.DocumentNavigator$IndexIterator.next()
can't throw NoSuchElement exception At DocumentNavigator.java:[line 236] M C NP: Possible null pointer dereference in org.jaxen.xom.DocumentNavigator.getDocumentNode(Object)
At DocumentNavigator.java:[line 217] M V MS: org.dom4j.io.SAXWriter.LEXICAL_HANDLER_NAMES should
be package protected H V MS: org.dom4j.io.SAXWriter.FEATURE_NAMESPACE_PREFIXES
isn't final but should be H V MS: org.dom4j.io.SAXWriter.FEATURE_NAMESPACES isn't
final but should be M V MS: org.dom4j.io.XMLWriter.LEXICAL_HANDLER_NAMES should
be package protected M V MS: org.dom4j.QName.cachePerThread isn't final but
should be M V MS: org.dom4j.tree.AbstractNode.NODE_TYPE_NAMES should
be package protected M V MS: org.dom4j.tree.NamespaceCache.cache isn't final but
should be M V MS: org.dom4j.tree.NamespaceCache.noPrefixCache isn't
final but should be H C Nm: VERY confusing to have methods
org.dom4j.dom.DOMDocumentType.getPublicId() and
org.dom4j.tree.DefaultDocumentType.getPublicID() H C Nm: VERY confusing to have methods
org.dom4j.dom.DOMDocumentType.getSystemId() and org.dom4j.tree.DefaultDocumentType.getSystemID() M C UwF: Unwritten field:
org.dom4j.io.XMLWriter.showCommentsInDTDs M P SIC: Should org.dom4j.io.HTMLWriter$FormatState be a
_static_ inner class? M P UrF: Unread field: org.dom4j.io.SAXContentHandler.availableNamespaceMap M P UrF: Unread field: org.dom4j.io.SAXContentHandler.declaredNamespaceList M P UuF: Unused field:
org.dom4j.io.aelfred.XmlParser.baseEncoding M P UuF: Unused field: org.dom4j.io.aelfred.XmlParser.baseInputBuffer M P UuF: Unused field:
org.dom4j.io.aelfred.XmlParser.baseInputBufferLength M P UuF: Unused field:
org.dom4j.io.aelfred.XmlParser.baseInputBufferStart M P SIC: Should org.dom4j.jaxb.JAXBModifier$JAXBElementModifier
be a _static_ inner class? M P SIC: Should
org.dom4j.jaxb.JAXBReader$PruningElementHandler be a _static_ inner class? M P SIC: Should
org.dom4j.jaxb.JAXBReader$UnmarshalElementHandler be a _static_ inner class? M P SIC: Should
org.jaxen.dom.DocumentNavigator$AttributeIterator be a _static_ inner class? M P SIC: Should org.jaxen.dom.NamespaceNode$EmptyNodeList be
a _static_ inner class? M P UrF: Unread field:
org.jaxen.util.StackedIterator.contextNode M P UrF: Unread field:
org.xml.sax.helpers.XMLFilterImpl.locator M P SIC: Should
org.xml.sax.helpers.XMLReaderAdapter$AttributesAdapter be a _static_ inner
class? M M IS2: Inconsistent synchronization of
org.dom4j.tree.ConcurrentReaderHashMap.table; locked 69% of time
Unsynchronized access at ConcurrentReaderHashMap.java:[line 664] |