Skip to content

Commit

Permalink
Modified lexer to use Character.isWhitespace() for determining if a
Browse files Browse the repository at this point in the history
character is white space.


git-svn-id: https://svn.apache.org/repos/asf/incubator/felix/trunk@421622 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Richard S. Hall committed Jul 13, 2006
1 parent bc54962 commit e26ed20
Showing 1 changed file with 1 addition and 3 deletions.
Expand Up @@ -24,8 +24,6 @@ public class LdapLexer {
static final int EOF = -1;
static final int NOCHAR = 0; // signal no peeked char; different from EOF

public static final String WHITESPACE = " \t\n\r";

Reader reader = null;

int nextChar = NOCHAR; // last peeked character
Expand Down Expand Up @@ -66,7 +64,7 @@ public int peek() throws IOException

void skipwhitespace() throws IOException
{
while(WHITESPACE.indexOf(peek()) >= 0) get();
while (Character.isWhitespace((char) peek())) get();
}

public int getnw() throws IOException // next non-whitespace char
Expand Down

0 comments on commit e26ed20

Please sign in to comment.