Details
-
Bug
-
Resolution: Incomplete
-
P4
-
8, 11
-
generic
-
generic
Description
ADDITIONAL SYSTEM INFORMATION :
macOS 10.13.6
A DESCRIPTION OF THE PROBLEM :
StAXSource uses the first event of the reader to determine the system ID. It uses the location of the event unconditionally. However, a reader which generates synthetic events doesn't necessarily have a location for its events. Moreover, it is allowed for the system ID to be null. Therefore, line 122 should become the following:
systemId = Optional.ofNullable(event.getLocation()).map(Location::getSystemId).orElse(null);
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Call the constructor with an XMLEventReader that generates synthetic events.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Correct construction and getSystemdId() returns null.
ACTUAL -
NullPointerException at line 122.
FREQUENCY : always
macOS 10.13.6
A DESCRIPTION OF THE PROBLEM :
StAXSource uses the first event of the reader to determine the system ID. It uses the location of the event unconditionally. However, a reader which generates synthetic events doesn't necessarily have a location for its events. Moreover, it is allowed for the system ID to be null. Therefore, line 122 should become the following:
systemId = Optional.ofNullable(event.getLocation()).map(Location::getSystemId).orElse(null);
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Call the constructor with an XMLEventReader that generates synthetic events.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Correct construction and getSystemdId() returns null.
ACTUAL -
NullPointerException at line 122.
FREQUENCY : always