< prev index next >
src/java.base/share/classes/jdk/internal/util/xml/impl/Parser.java
Print this page
*** 118,130 ****
private String mUnent; // unresolved entity name
private Pair mDltd; // deleted objects for reuse
/**
* Default prefixes
*/
! private static final char NONS[];
! private static final char XML[];
! private static final char XMLNS[];
static {
NONS = new char[1];
NONS[0] = (char) 0;
--- 118,130 ----
private String mUnent; // unresolved entity name
private Pair mDltd; // deleted objects for reuse
/**
* Default prefixes
*/
! private static final char[] NONS;
! private static final char[] XML;
! private static final char[] XMLNS;
static {
NONS = new char[1];
NONS[0] = (char) 0;
*** 152,162 ****
* - 'd' for any decimal digit character value;<br> - 'z' for any
* character less than ' ' except '\t', '\n', '\r';<br> An ASCII (7 bit)
* character which does not fall in any category listed above is mapped to
* it self.
*/
! private static final byte asctyp[];
/**
* NMTOKEN character type array.
*
* This array maps an ASCII (7 bit) character to the character type.<br>
* Possible character type values are:<br> - 0 for underscore ('_') or any
--- 152,162 ----
* - 'd' for any decimal digit character value;<br> - 'z' for any
* character less than ' ' except '\t', '\n', '\r';<br> An ASCII (7 bit)
* character which does not fall in any category listed above is mapped to
* it self.
*/
! private static final byte[] asctyp;
/**
* NMTOKEN character type array.
*
* This array maps an ASCII (7 bit) character to the character type.<br>
* Possible character type values are:<br> - 0 for underscore ('_') or any
*** 164,174 ****
* (':') character;<br> - 2 for dash ('-') and dot ('.') or any decimal
* digit character value;<br> - 3 for any kind of white space character<br>
* An ASCII (7 bit) character which does not fall in any category listed
* above is mapped to 0xff.
*/
! private static final byte nmttyp[];
/**
* Static constructor.
*
* Sets up the ASCII character type array which is used by
--- 164,174 ----
* (':') character;<br> - 2 for dash ('-') and dot ('.') or any decimal
* digit character value;<br> - 3 for any kind of white space character<br>
* An ASCII (7 bit) character which does not fall in any category listed
* above is mapped to 0xff.
*/
! private static final byte[] nmttyp;
/**
* Static constructor.
*
* Sets up the ASCII character type array which is used by
*** 950,960 ****
*
* @exception Exception is parser specific exception form panic method.
* @exception IOException
*/
private void dtdattl() throws Exception {
! char elmqn[] = null;
Pair elm = null;
char ch;
for (short st = 0; st >= 0;) {
ch = getch();
switch (st) {
--- 950,960 ----
*
* @exception Exception is parser specific exception form panic method.
* @exception IOException
*/
private void dtdattl() throws Exception {
! char[] elmqn = null;
Pair elm = null;
char ch;
for (short st = 0; st >= 0;) {
ch = getch();
switch (st) {
*** 1036,1046 ****
* @exception Exception is parser specific exception form panic method.
* @exception IOException
*/
@SuppressWarnings("fallthrough")
private void dtdatt(Pair elm) throws Exception {
! char attqn[] = null;
Pair att = null;
char ch;
for (short st = 0; st >= 0;) {
ch = getch();
switch (st) {
--- 1036,1046 ----
* @exception Exception is parser specific exception form panic method.
* @exception IOException
*/
@SuppressWarnings("fallthrough")
private void dtdatt(Pair elm) throws Exception {
! char[] attqn = null;
Pair att = null;
char ch;
for (short st = 0; st >= 0;) {
ch = getch();
switch (st) {
*** 1772,1782 ****
*/
protected char[] qname(boolean ns)
throws Exception {
mBuffIdx = -1;
bname(ns);
! char chars[] = new char[mBuffIdx + 1];
System.arraycopy(mBuff, 0, chars, 0, mBuffIdx + 1);
return chars;
}
/**
--- 1772,1782 ----
*/
protected char[] qname(boolean ns)
throws Exception {
mBuffIdx = -1;
bname(ns);
! char[] chars = new char[mBuffIdx + 1];
System.arraycopy(mBuff, 0, chars, 0, mBuffIdx + 1);
return chars;
}
/**
*** 2708,2718 ****
private void bappend(char ch) {
try {
mBuff[++mBuffIdx] = ch;
} catch (Exception exp) {
// Double the buffer size
! char buff[] = new char[mBuff.length << 1];
System.arraycopy(mBuff, 0, buff, 0, mBuff.length);
mBuff = buff;
mBuff[mBuffIdx] = ch;
}
}
--- 2708,2718 ----
private void bappend(char ch) {
try {
mBuff[++mBuffIdx] = ch;
} catch (Exception exp) {
// Double the buffer size
! char[] buff = new char[mBuff.length << 1];
System.arraycopy(mBuff, 0, buff, 0, mBuff.length);
mBuff = buff;
mBuff[mBuffIdx] = ch;
}
}
*** 2726,2736 ****
*/
private void bcopy(int cidx, int bidx) {
int length = mChIdx - cidx;
if ((bidx + length + 1) >= mBuff.length) {
// Expand the buffer
! char buff[] = new char[mBuff.length + length];
System.arraycopy(mBuff, 0, buff, 0, mBuff.length);
mBuff = buff;
}
System.arraycopy(mChars, cidx, mBuff, bidx, length);
mBuffIdx += length;
--- 2726,2736 ----
*/
private void bcopy(int cidx, int bidx) {
int length = mChIdx - cidx;
if ((bidx + length + 1) >= mBuff.length) {
// Expand the buffer
! char[] buff = new char[mBuff.length + length];
System.arraycopy(mBuff, 0, buff, 0, mBuff.length);
mBuff = buff;
}
System.arraycopy(mChars, cidx, mBuff, bidx, length);
mBuffIdx += length;
< prev index next >