# HG changeset patch # User joehw # Date 1484768863 28800 # Node ID 6573c99129a3c91b9ddefc8489fc385ef0871741 # Parent fc2d987bdeecd7703695f705b2d1d03e569ef8be 8172875: Resizing XML parse trees test update Reviewed-by: dfuchs, lancea diff -r fc2d987bdeec -r 6573c99129a3 src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLStreamReaderImpl.java --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLStreamReaderImpl.java Tue Nov 22 14:49:33 2016 -0800 +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLStreamReaderImpl.java Wed Jan 18 11:47:43 2017 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, 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 @@ -610,6 +610,14 @@ switchToXML11Scanner(); } + if (fEventType == XMLStreamConstants.CHARACTERS || + fEventType == XMLStreamConstants.ENTITY_REFERENCE || + fEventType == XMLStreamConstants.PROCESSING_INSTRUCTION || + fEventType == XMLStreamConstants.COMMENT || + fEventType == XMLStreamConstants.CDATA) { + fEntityScanner.checkNodeCount(fEntityScanner.fCurrentEntity); + } + return fEventType; } catch (IOException ex) { // if this error occured trying to resolve the external DTD subset