From bce78e9e695e185501a05474b4862fe30a45863f Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Sun, 15 Nov 2009 19:18:31 +0100 Subject: [PATCH] Bugfixed the PeekReader. --- src/dolda/jsvc/next/PeekReader.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/dolda/jsvc/next/PeekReader.java b/src/dolda/jsvc/next/PeekReader.java index 1c3fce5..7981c43 100644 --- a/src/dolda/jsvc/next/PeekReader.java +++ b/src/dolda/jsvc/next/PeekReader.java @@ -46,12 +46,10 @@ public class PeekReader extends Reader { } public int peek(boolean skipws) throws IOException { - if(p) - return(la); - do { + while(!p || (skipws && (la >= 0) && whitespace((char)la))) { la = back.read(); p = true; - } while(skipws && (la >= 0) && whitespace((char)la)); + } return(la); } -- 2.11.0