JDK-7151484 : NullPointerException caused by a bug in XMLDocumentFragmentScannerImpl
  • Type: Bug
  • Component: xml
  • Sub-Component: javax.xml.parsers
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: linux_2.6
  • CPU: x86
  • Submitted: 2012-03-06
  • Updated: 2012-09-28
  • Resolved: 2012-05-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7u6 b06Fixed
Description
See http://netbeans.org/bugzilla/show_bug.cgi?id=195994
Full exception is at the end of http://statistics.netbeans.org/exceptions/messageslog?id=535403

The problem is, that XMLDocumentFragmentScannerImpl.scanEntityReference() checks for a null "name", but then fEntityStore.isExternalEntity(name) is called with a null argument.

Comments
EVALUATION Fixed as proposed. Thanks for suggesting fix!
02-04-2012

SUGGESTED FIX Doing return if "name == null" should fix this problem. This fix was already applied in xerces sources - see http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/XMLDocumentFragmentScannerImpl.java?r1=318781&r2=318782& It's fixed e.g. in Xerces 2.9.1, as can be seen from http://www.docjar.org/docs/api/org/apache/xerces/impl/XMLDocumentFragmentScannerImpl.html Please port this fix into JDK.
06-03-2012