--- old/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DocumentImpl.java 2018-12-06 17:26:30.821533673 -0500 +++ new/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DocumentImpl.java 2018-12-06 17:26:30.649532820 -0500 @@ -542,7 +542,7 @@ { // We can't dispatch to blank type-name, and of course we need // a listener to dispatch to - if (type == null || type.equals("") || listener == null) + if (type == null || type.isEmpty() || listener == null) return; // Each listener may be registered only once per type per phase. @@ -586,7 +586,7 @@ boolean useCapture) { // If this couldn't be a valid listener registration, ignore request - if (type == null || type.equals("") || listener == null) + if (type == null || type.isEmpty() || listener == null) return; List nodeListeners = getEventListeners(node); if (nodeListeners == null) @@ -690,7 +690,7 @@ // VALIDATE -- must have been initialized at least once, must have // a non-null non-blank name. - if(!evt.initialized || evt.type == null || evt.type.equals("")) { + if(!evt.initialized || evt.type == null || evt.type.isEmpty()) { String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "UNSPECIFIED_EVENT_TYPE_ERR", null); throw new EventException(EventException.UNSPECIFIED_EVENT_TYPE_ERR, msg); }