< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XML11EntityScanner.java

Print this page
rev 903 : 8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET

*** 1,17 **** /* ! * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. */ /* ! * Copyright 2005 The Apache Software Foundation. * ! * Licensed under the Apache License, Version 2.0 (the "License"); ! * you may not use this file except in compliance with the License. ! * You may obtain a copy of the License at ! * ! * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and --- 1,18 ---- /* ! * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. */ /* ! * Licensed to the Apache Software Foundation (ASF) under one or more ! * contributor license agreements. See the NOTICE file distributed with ! * this work for additional information regarding copyright ownership. ! * The ASF licenses this file to You under the Apache License, Version 2.0 ! * (the "License"); you may not use this file except in compliance with ! * the License. You may obtain a copy of the License at * ! * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and
*** 22,32 **** import com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter; import com.sun.org.apache.xerces.internal.util.XML11Char; import com.sun.org.apache.xerces.internal.util.XMLChar; import com.sun.org.apache.xerces.internal.util.XMLStringBuffer; - import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager.Limit; import com.sun.org.apache.xerces.internal.xni.QName; import com.sun.org.apache.xerces.internal.xni.XMLString; import java.io.IOException; --- 23,32 ----
*** 813,823 **** // load more characters, if needed if (fCurrentEntity.position == fCurrentEntity.count) { load(0, true, true); } else if (fCurrentEntity.position == fCurrentEntity.count - 1) { ! invokeListeners(0); fCurrentEntity.ch[0] = fCurrentEntity.ch[fCurrentEntity.count - 1]; load(1, false, false); fCurrentEntity.position = 0; fCurrentEntity.startPosition = 0; } --- 813,823 ---- // load more characters, if needed if (fCurrentEntity.position == fCurrentEntity.count) { load(0, true, true); } else if (fCurrentEntity.position == fCurrentEntity.count - 1) { ! invokeListeners(1); fCurrentEntity.ch[0] = fCurrentEntity.ch[fCurrentEntity.count - 1]; load(1, false, false); fCurrentEntity.position = 0; fCurrentEntity.startPosition = 0; }
*** 958,968 **** // load more characters, if needed if (fCurrentEntity.position == fCurrentEntity.count) { load(0, true, true); } else if (fCurrentEntity.position == fCurrentEntity.count - 1) { ! invokeListeners(0); fCurrentEntity.ch[0] = fCurrentEntity.ch[fCurrentEntity.count - 1]; load(1, false, false); fCurrentEntity.startPosition = 0; fCurrentEntity.position = 0; } --- 958,968 ---- // load more characters, if needed if (fCurrentEntity.position == fCurrentEntity.count) { load(0, true, true); } else if (fCurrentEntity.position == fCurrentEntity.count - 1) { ! invokeListeners(1); fCurrentEntity.ch[0] = fCurrentEntity.ch[fCurrentEntity.count - 1]; load(1, false, false); fCurrentEntity.startPosition = 0; fCurrentEntity.position = 0; }
*** 1395,1405 **** // handle newlines if (c == '\n' || c == '\r' || c == 0x85 || c == 0x2028) { fCurrentEntity.lineNumber++; fCurrentEntity.columnNumber = 1; if (fCurrentEntity.position == fCurrentEntity.count - 1) { ! invokeListeners(0); fCurrentEntity.ch[0] = (char)c; entityChanged = load(1, true, false); if (!entityChanged) { // the load change the position to be 1, // need to restore it when entity not changed --- 1395,1405 ---- // handle newlines if (c == '\n' || c == '\r' || c == 0x85 || c == 0x2028) { fCurrentEntity.lineNumber++; fCurrentEntity.columnNumber = 1; if (fCurrentEntity.position == fCurrentEntity.count - 1) { ! invokeListeners(1); fCurrentEntity.ch[0] = (char)c; entityChanged = load(1, true, false); if (!entityChanged) { // the load change the position to be 1, // need to restore it when entity not changed
*** 1444,1455 **** // handle newlines if (c == '\n') { fCurrentEntity.lineNumber++; fCurrentEntity.columnNumber = 1; if (fCurrentEntity.position == fCurrentEntity.count - 1) { fCurrentEntity.ch[0] = (char)c; ! entityChanged = load(1, true, true); if (!entityChanged) { // the load change the position to be 1, // need to restore it when entity not changed fCurrentEntity.startPosition = 0; fCurrentEntity.position = 0; --- 1444,1456 ---- // handle newlines if (c == '\n') { fCurrentEntity.lineNumber++; fCurrentEntity.columnNumber = 1; if (fCurrentEntity.position == fCurrentEntity.count - 1) { + invokeListeners(1); fCurrentEntity.ch[0] = (char)c; ! entityChanged = load(1, true, false); if (!entityChanged) { // the load change the position to be 1, // need to restore it when entity not changed fCurrentEntity.startPosition = 0; fCurrentEntity.position = 0;
< prev index next >