Skip to content

Commit de85f2b

Browse files
committed
Fix errorprone violations.
1 parent 07eb60d commit de85f2b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

javascript/extractor/src/com/semmle/js/parser/JSONParser.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ private void skipLineComment() throws ParseError {
356356
char c;
357357
next();
358358
next();
359-
while ((c = peek()) != '\r' && c != '\n' && c != -1) next();
359+
while ((c = peek()) != '\r' && c != '\n') next();
360360
}
361361

362362
/** Skips the block comment starting at the current position. */
@@ -367,7 +367,6 @@ private void skipBlockComment() throws ParseError {
367367
next();
368368
do {
369369
c = peek();
370-
if (c < 0) raise("Unterminated comment.");
371370
next();
372371
if (c == '*' && peek() == '/') {
373372
next();

0 commit comments

Comments
 (0)