Bug 8803: check for null return NamespaceContext.getNamespaceURI()
The javadoc indicates that for unbound prefixes this method should be
returning NULL_NS_URI (which is defined as an empty string), and there
is no mention of the possibility of returning null anywhere.
Nevertheless JDK8-default XMLOutputWriter returns null for unbound
prefixes, which leads to an infinite loop in RandomPrefix.
Fix this by adding an explicit check for null, too.
Change-Id: Ib8af7d03eb59b004f2fcb4d1806c0f4f256a974a
Signed-off-by: Igor Foltin <igor.foltin@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
9946267ef128228dad7d6cc9dd5319bfad081756)
Signed-off-by: Igor Foltin <igor.foltin@pantheon.tech>