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

Method continueNumber

solr/solrj/src/java/org/noggit/JSONParser.java:625–654  ·  view source on GitHub ↗
(CharArr arr)

Source from the content-addressed store, hash-verified

623 }
624
625 private void continueNumber(CharArr arr) throws IOException {
626 if (arr != out) arr.write(out);
627
628 if ((nstate & HAS_EXPONENT) != 0) {
629 readExpDigits(arr, Integer.MAX_VALUE);
630 return;
631 }
632 if (nstate != 0) {
633 readFrac(arr, Integer.MAX_VALUE);
634 return;
635 }
636
637 for (; ; ) {
638 int ch = getChar();
639 if (ch >= '0' && ch <= '9') {
640 arr.write(ch);
641 } else if (ch == '.') {
642 arr.write(ch);
643 readFrac(arr, Integer.MAX_VALUE);
644 return;
645 } else if (ch == 'e' || ch == 'E') {
646 arr.write(ch);
647 readExp(arr, Integer.MAX_VALUE);
648 return;
649 } else {
650 if (ch != -1) start--;
651 return;
652 }
653 }
654 }
655
656 private int hexval(int hexdig) {
657 if (hexdig >= '0' && hexdig <= '9') {

Callers 2

nextEventMethod · 0.95
getNumberCharsMethod · 0.95

Calls 5

readExpDigitsMethod · 0.95
readFracMethod · 0.95
getCharMethod · 0.95
readExpMethod · 0.95
writeMethod · 0.65

Tested by

no test coverage detected