--- old/src/java.base/share/classes/jdk/internal/util/xml/impl/Parser.java 2018-12-04 12:43:34.365004838 -0800 +++ new/src/java.base/share/classes/jdk/internal/util/xml/impl/Parser.java 2018-12-04 12:43:33.772950768 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -650,6 +650,8 @@ * @exception IOException */ private void dtdsub() throws Exception { + startInternalSub(); // reports the event before parsing the subset + char ch; for (short st = 0; st >= 0;) { ch = getch(); @@ -2231,6 +2233,13 @@ throws SAXException; /** + * Reports the start of DTD internal subset. + * + * @throws SAXException if the receiver throws SAXException + */ + public abstract void startInternalSub () throws SAXException; + + /** * Reports a comment. * * @param text The comment text starting from first charcater.