mirror of
https://github.com/github/codeql.git
synced 2026-02-22 01:43:41 +01:00
Address review
This commit is contained in:
@@ -79,7 +79,7 @@ public class JSONParser {
|
||||
}
|
||||
|
||||
private char peek() {
|
||||
return offset < length ? src.charAt(offset) : (char) -1;
|
||||
return offset < length ? src.charAt(offset) : Character.MAX_VALUE;
|
||||
}
|
||||
|
||||
private JSONValue readValue() throws ParseError {
|
||||
@@ -356,7 +356,7 @@ public class JSONParser {
|
||||
char c;
|
||||
next();
|
||||
next();
|
||||
while ((c = peek()) != '\r' && c != '\n') next();
|
||||
while ((c = peek()) != '\r' && c != '\n' && c != Character.MAX_VALUE) next();
|
||||
}
|
||||
|
||||
/** Skips the block comment starting at the current position. */
|
||||
@@ -367,6 +367,7 @@ public class JSONParser {
|
||||
next();
|
||||
do {
|
||||
c = peek();
|
||||
if (c == Character.MAX_VALUE) raise("Unterminated comment");
|
||||
next();
|
||||
if (c == '*' && peek() == '/') {
|
||||
next();
|
||||
|
||||
Reference in New Issue
Block a user