Browse Source

Merge pull request #362 in CORE/base-third from ~BRYANT/base-third:research/10.0 to research/10.0

* commit '367d89e5b9acbfae6a60fd67642a50eb29a8c6c0':
  无jira任务 third包修改
  无jira任务 third包修改
research/10.0
zhouping 5 years ago
parent
commit
2909054e4c
  1. 25
      fine-third-default/fine-sjsxp/src/main/java/com/fr/third/javax/xml/stream/XMLEntityReaderImpl.java

25
fine-third-default/fine-sjsxp/src/main/java/com/fr/third/javax/xml/stream/XMLEntityReaderImpl.java

@ -183,6 +183,7 @@ public class XMLEntityReaderImpl extends XMLEntityReader {
validContent[i]=true;
}
validContent[0x9]=true;
validContent[0xA]=true;
validContent[0x26]=false;
validContent[0x3C]=false;
validContent[0x5D]=false;
@ -1353,6 +1354,27 @@ public class XMLEntityReaderImpl extends XMLEntityReader {
break;
}
else if (XMLChar.isInvalid(c)) {
if(XMLChar.isHighSurrogate(c)){
fCurrentEntity.position--;
if (fCurrentEntity.position - offset > 0){
int length = fCurrentEntity.position - offset;
fCurrentEntity.columnNumber += length - newlines;
buffer.append(fCurrentEntity.ch, offset, length);
}
int high = this.scanChar();
int low = this.peekChar();
if (!XMLChar.isLowSurrogate(low)) {
return false;
}
int x = XMLChar.supplemental((char)high, (char)low);
if (isInvalid(x)) {
return false;
}
buffer.append((char)high);
buffer.append((char)low);
offset = ++fCurrentEntity.position;
break;
}
fCurrentEntity.position--;
int length = fCurrentEntity.position - offset;
fCurrentEntity.columnNumber += length - newlines;
@ -1361,12 +1383,13 @@ public class XMLEntityReaderImpl extends XMLEntityReader {
}
}
int length = fCurrentEntity.position - offset;
if (length != 0){
fCurrentEntity.columnNumber += length - newlines;
if (done) {
length -= delimLen;
}
buffer.append(fCurrentEntity.ch, offset, length);
}
// return true if string was skipped
if (DEBUG_BUFFER) {
System.out.print(")scanData: ");

Loading…
Cancel
Save