MCPcopy Create free account
hub / github.com/apache/solr / getSlashComment

Method getSlashComment

solr/solrj/src/java/org/noggit/JSONParser.java:365–392  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

363 }
364
365 protected void getSlashComment() throws IOException {
366 int ch = getChar();
367 if (ch == '/') {
368 getNewlineComment();
369 return;
370 }
371
372 if (ch != '*') {
373 throw err("Invalid comment: expected //, /*, or #");
374 }
375
376 ch = getChar();
377 for (; ; ) {
378 if (ch == '*') {
379 ch = getChar();
380 if (ch == '/') {
381 return;
382 } else if (ch == '*') {
383 // handle cases of *******/
384 continue;
385 }
386 }
387 if (ch == -1) {
388 return;
389 }
390 ch = getChar();
391 }
392 }
393
394 protected boolean matchBareWord(char[] arr) throws IOException {
395 for (int i = 1; i < arr.length; i++) {

Callers 2

getCharNWSMethod · 0.95
nextMethod · 0.95

Calls 3

getCharMethod · 0.95
getNewlineCommentMethod · 0.95
errMethod · 0.95

Tested by

no test coverage detected