United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7151484 NullPointerException caused by a bug in XMLDocumentFragmentScannerImpl
7151484 : NullPointerException caused by a bug in XMLDocumentFragmentScannerImpl

Details
Type:
Bug
Submit Date:
2012-03-06
Status:
Closed
Updated Date:
2012-09-28
Project Name:
JDK
Resolved Date:
2012-05-05
Component:
xml
OS:
linux_2.6
Sub-Component:
javax.xml.parsers
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
7u6

Related Reports

Sub Tasks

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!
                                     
2012-04-02
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.
                                     
2012-03-06



Hardware and Software, Engineered to Work Together