Skip to content

Commit

Permalink
improved performance
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed Apr 30, 2016
1 parent 48ed0f6 commit 10d1111
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/alibaba/fastjson/parser/JSONLexer.java
Expand Up @@ -7,7 +7,7 @@

public interface JSONLexer {

byte EOI = 0x1A;
char EOI = 0x1A;
int NOT_MATCH = -1;
int NOT_MATCH_NAME = -2;
int UNKNOWN = 0;
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/com/alibaba/fastjson/parser/JSONScanner.java
Expand Up @@ -62,7 +62,10 @@ public final char charAt(int index) {
}

public final char next() {
return ch = charAt(++bp);
int index = ++bp;
return ch = (index >= this.len ? //
EOI //
: text.charAt(index));
}

public JSONScanner(char[] input, int inputLength){
Expand Down

0 comments on commit 10d1111

Please sign in to comment.