Merge pull request #14552 from github/criemen/bazel-js

Javascript extractor: Bazel-based build
This commit is contained in:
Cornelius Riemenschneider
2023-10-24 19:36:39 +02:00
committed by GitHub
2 changed files with 21 additions and 3 deletions

View File

@@ -0,0 +1,18 @@
load("@//:common.bzl", "codeql_java_project")
codeql_java_project(
name = "extractor",
deps = [
"@//extractor",
"@//resources/lib/java:commons-compress",
"@//resources/lib/java:gson",
"@//resources/lib/java:jericho-html",
"@//resources/lib/java:slf4j-api",
"@//resources/lib/java:snakeyaml",
"@//resources/lib/java/DO_NOT_DISTRIBUTE:junit",
"@//third_party:jackson",
"@//third_party:logback",
"@//util-java7",
"@//util-java8",
],
)

View File

@@ -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' && c != -1) next();
while ((c = peek()) != '\r' && c != '\n' && c != Character.MAX_VALUE) next();
}
/** Skips the block comment starting at the current position. */
@@ -367,7 +367,7 @@ public class JSONParser {
next();
do {
c = peek();
if (c < 0) raise("Unterminated comment.");
if (c == Character.MAX_VALUE) raise("Unterminated comment");
next();
if (c == '*' && peek() == '/') {
next();