Index: ../../incubator-johnzon/johnzon-core/src/test/java/org/apache/johnzon/core/JsonParserTest.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- ../../incubator-johnzon/johnzon-core/src/test/java/org/apache/johnzon/core/JsonParserTest.java	(revision b7948d5174018ddf04c95a4abd8107720d20155e)
+++ ../../incubator-johnzon/johnzon-core/src/test/java/org/apache/johnzon/core/JsonParserTest.java	(revision )
@@ -48,15 +48,15 @@
 import org.junit.Test;
 
 public class JsonParserTest {
-    
-    
+
+
     static final Charset UTF_8 = Charset.forName("UTF-8");
     static final Charset UTF_16BE = Charset.forName("UTF-16BE");
     static final Charset UTF_16LE = Charset.forName("UTF-16LE");
     static final Charset UTF_16 = Charset.forName("UTF-16");
     static final Charset UTF_32LE = Charset.forName("UTF-32LE");
     static final Charset UTF_32BE = Charset.forName("UTF-32BE");
-    
+
     public JsonParserTest() {
         if (!Charset.defaultCharset().equals(Charset.forName("UTF-8"))) {
             System.err.println("Default charset is " + Charset.defaultCharset() + ", must must be UTF-8");
@@ -226,7 +226,7 @@
         JsonArrayBuilder ab = Json.createArrayBuilder();
         ab.add(new JsonNumberImpl(new BigDecimal(1)));
         ab.add(new JsonNumberImpl(new BigDecimal(-2)));
-        
+
         ob.add("d", ab);
 
         final JsonParser parser = Json.createParserFactory(Collections.<String, Object>emptyMap()).createParser(ob.build());
@@ -240,7 +240,7 @@
         assertNotNull(parser);
         assertSimple(parser);
     }
-    
+
     @Test
     public void simpleUTF16LE() {
         final JsonParser parser = Json.createParserFactory(null).createParser(Thread.currentThread()
@@ -248,14 +248,14 @@
         assertNotNull(parser);
         assertSimple(parser);
     }
-    
+
     @Test
     public void simpleUTF16LEAutoDetect() {
         final JsonParser parser = Json.createParserFactory(null).createParser(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/simple_utf16le.json"));
         assertNotNull(parser);
         assertSimple(parser);
     }
-    
+
 
     @Test
     public void nested() {
@@ -345,7 +345,7 @@
         parser.close();
     }
 
-    
+
     @Test
     public void numbers() {
         final JsonParser parser = Json.createParser(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/numbers.json"));
@@ -529,14 +529,14 @@
             assertEquals(new BigDecimal("-999999999999999999999999999999"), parser.getBigDecimal());
         }
         parser.next();
-        
+
         {
             assertFalse(parser.hasNext());
         }
         parser.close();
     }
-    
-    
+
+
     @Test
     public void bigdecimal() {
         final JsonParser parser = Json.createParser(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/bigdecimal.json"));
@@ -603,7 +603,7 @@
         }
         parser.close();
     }
-    
+
     @Test(expected=IllegalStateException.class)
     public void isIntegralThrowsISE() {
         final JsonParser parser = Json.createParser(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/bigdecimal.json"));
@@ -613,9 +613,9 @@
         assertNotNull(event);
         assertEquals(JsonParser.Event.START_OBJECT, event);
         assertFalse(parser.isIntegralNumber());
-            
+
     }
-    
+
     @Test
     public void escaping() {
         final JsonParser parser = Json.createParser(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/escaping.json"));
@@ -642,7 +642,7 @@
         assertFalse(parser.hasNext());
         parser.close();
     }
-    
+
     @Test
     public void escapedStringAwareParser() {
         final JsonParser parser = Json.createParser(Thread.currentThread()
@@ -654,11 +654,11 @@
         assertEquals("\"s\\\"mit\\\"\"", new JsonStringImpl(parser.getString()).toString());
         parser.close();
     }
-    
+
     @Test
     public void bufferOverFlow() {
         JsonParser parser1 = Json.createParser(new StringReader("{}{}"));
-        
+
         try {
             while(parser1.hasNext()) {
                 parser1.next();
@@ -669,14 +669,14 @@
         } finally {
             parser1.close();
         }
-        
-        
-        
+
+
+
         JsonParser parser2 = Json.createParser(new StringReader("{"));
         int i=0;
         try {
             while(parser2.hasNext()) {
-                    parser2.next();                                
+                    parser2.next();
             }
             fail();
         } catch (JsonParsingException e) {
@@ -684,14 +684,14 @@
         } finally {
             parser2.close();
         }
-        
-        
+
+
     }
-    
+
     @Test
     public void bufferOverFlow2() {
         JsonParser parser1 = Json.createParser(new StringReader("{  }{}"));
-        
+
         try {
             while(parser1.hasNext()) {
                 parser1.next();
@@ -702,14 +702,14 @@
         } finally {
             parser1.close();
         }
-        
-        
-        
+
+
+
         JsonParser parser2 = Json.createParser(new StringReader("{"));
         int i=0;
         try {
             while(parser2.hasNext()) {
-                    parser2.next();                                
+                    parser2.next();
             }
             fail();
         } catch (JsonParsingException e) {
@@ -717,8 +717,8 @@
         } finally {
             parser2.close();
         }
-        
-        
+
+
     }
 
     @Test
@@ -753,8 +753,8 @@
             }
             parser.close();
         }
-        
-        
+
+
         // spaces
         {
             final JsonParser parser = Json.createParserFactory(new HashMap<String, Object>() {{
@@ -802,35 +802,35 @@
     @Test(expected = JsonParsingException.class)
     public void commaChecks() {
         // using a reader as wrapper of parser
-  
+
         Json.createReader(new ByteArrayInputStream("{\"z\":\"b\"\"j\":\"d\"}".getBytes())).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void literalFailChecksTrue() {
         // using a reader as wrapper of parser
-  
+
         Json.createReader(new ByteArrayInputStream("{\"z\":truet}".getBytes())).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void literalFailChecksNull() {
         // using a reader as wrapper of parser
-  
+
         Json.createReader(new ByteArrayInputStream("{\"z\":nulll}".getBytes())).read();
     }
-    
+
     @Test(expected = JsonException.class)
     public void zeroByteInput() {
         // using a reader as wrapper of parser
-  
+
         Json.createReader(new ByteArrayInputStream(new byte[]{})).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void zeroCharInput() {
         // using a reader as wrapper of parser
-  
+
         Json.createReader(new CharArrayReader(new char[]{})).read();
     }
 
@@ -865,7 +865,7 @@
         assertTrue(!parser.hasNext());
         parser.close();
     }
-    
+
     @Test
     public void testUTF32BEStream() {
         ByteArrayInputStream bin = new ByteArrayInputStream("[\"UTF32BE\"]".getBytes(UTF_32BE));
@@ -877,7 +877,7 @@
         assertTrue(!parser.hasNext());
         parser.close();
     }
-    
+
     @Test
     public void testUTF16BEStream() {
         ByteArrayInputStream bin = new ByteArrayInputStream("[\"UTF16BE\"]".getBytes(UTF_16BE));
@@ -889,7 +889,7 @@
         assertTrue(!parser.hasNext());
         parser.close();
     }
-    
+
     @Test
     public void testUTF16LEStream() {
         ByteArrayInputStream bin = new ByteArrayInputStream("[\"UTF16LE\"]".getBytes(UTF_16LE));
@@ -901,7 +901,7 @@
         assertTrue(!parser.hasNext());
         parser.close();
     }
-    
+
     @Test
     public void testUTF8Stream() {
         ByteArrayInputStream bin = new ByteArrayInputStream("[\"UTF8\"]".getBytes(UTF_8));
@@ -913,7 +913,7 @@
         assertTrue(!parser.hasNext());
         parser.close();
     }
-    
+
     @Test
     public void testUTF16Stream() {
         //this writes UTF 16 with Byte Order Mark (BOM)
@@ -926,7 +926,7 @@
         assertTrue(!parser.hasNext());
         parser.close();
     }
-    
+
     @Test
     public void testUTF16LEBOMStream() {
         ByteArrayInputStream bin = new ByteArrayInputStream("\ufeff[\"UTF16LEBOM\"]".getBytes(UTF_16LE));
@@ -938,7 +938,7 @@
         assertTrue(!parser.hasNext());
         parser.close();
     }
-    
+
     @Test
     public void testUTF16BEBOMStream() {
         ByteArrayInputStream bin = new ByteArrayInputStream("\ufeff[\"UTF16BEBOM\"]".getBytes(UTF_16BE));
@@ -950,7 +950,7 @@
         assertTrue(!parser.hasNext());
         parser.close();
     }
-    
+
     @Test
     public void testUTF32LEBOMStream() {
         ByteArrayInputStream bin = new ByteArrayInputStream("\ufeff[\"UTF32LEBOM\"]".getBytes(UTF_32LE));
@@ -962,31 +962,31 @@
         assertTrue(!parser.hasNext());
         parser.close();
     }
-    
+
     @Test
     public void testBinaryNullStreamBOM() {
         ByteArrayInputStream bin = new ByteArrayInputStream("\ufeff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0".getBytes(UTF_32LE));
         JsonParser parser = Json.createParser(bin);
-        
+
         try {
             parser.next();
             fail();
         } catch (JsonParsingException e) {
             //expected
         }
-       
+
     }
-    
+
     @Test(expected=JsonParsingException.class)
     public void testBinaryNullStream() {
         ByteArrayInputStream bin = new ByteArrayInputStream("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0".getBytes(UTF_8));
         JsonParser parser = Json.createParser(bin);
         parser.next();
     }
-    
+
     @Test
     public void testUTF32BEBOMStream() {
-        
+
         ByteArrayInputStream bin = new ByteArrayInputStream("\ufeff[\"UTF32BEBOM\"]".getBytes(UTF_32BE));
         JsonParser parser = Json.createParser(bin);
         parser.next();
@@ -996,7 +996,7 @@
         assertTrue(!parser.hasNext());
         parser.close();
     }
-    
+
     @Test
     public void testUTF8BEBOMStream() {
         ByteArrayInputStream bin = new ByteArrayInputStream("\ufeff[\"UTF8BOM\"]".getBytes(UTF_8));
@@ -1008,9 +1008,9 @@
         assertTrue(!parser.hasNext());
         parser.close();
     }
-    
+
     @Test
-    public void testStreamReadNotAllBytes() {       
+    public void testStreamReadNotAllBytes() {
         AttemptingInputStream bin = new AttemptingInputStream("\ufeff[\"UTF8BOM\"]".getBytes(UTF_8));
         JsonParser parser = Json.createParser(bin);
         parser.next();
@@ -1020,37 +1020,62 @@
         assertTrue(!parser.hasNext());
         parser.close();
     }
-    
+
     @Test
     public void shortestNonEmtyJsonFile() {
         // using a reader as wrapper of parser
-  
+
         assertEquals(0L, Json.createReader(new ByteArrayInputStream("[0]".getBytes())).readArray().getJsonNumber(0).longValue());
     }
-    
-    
+
+
     @Test
     public void shortestNonEmtyJsonFileWithWhiteSpaceChars() {
         // using a reader as wrapper of parser
-  
+
         assertEquals(0L, Json.createReader(new ByteArrayInputStream("  \n\n   [   0  ]  \n\n".getBytes())).readArray().getJsonNumber(0).longValue());
     }
-    
+
     @Test
     public void escapeStart() {
         // using a reader as wrapper of parser
-  
+
         assertEquals("\\abcdef", Json.createReader(new ByteArrayInputStream("[\"\\\\abcdef\"]".getBytes())).readArray().getString(0));
     }
-    
+
     @Test
     public void escapeStart2() {
         // using a reader as wrapper of parser
-  
+
         assertEquals("\"abcdef", Json.createReader(new ByteArrayInputStream("[\"\\\"abcdef\"]".getBytes())).readArray().getString(0));
     }
-    
+
     @Test
+    public void testSlowIs() {
+        // using a reader as wrapper of parser
+        class SlowIs extends ByteArrayInputStream {
+            private boolean slowDown = true;
+
+            @Override
+            public synchronized int read(byte[] b, int off, int len) {
+                if(slowDown) {
+                    this.count = 5;
+                    slowDown = false;
+                } else {
+                    this.count = this.buf.length;
+                }
+                return super.read(b, off, len);
+            }
+
+            protected SlowIs() {
+                super("{\"message\":\"Hi REST!\"}".getBytes());
+            }
+        }
+
+        assertEquals("Hi REST!", Json.createReaderFactory(null).createReader(new SlowIs(), UTF_8).readObject().getString("message"));
+    }
+
+    @Test
     public void threeLiterals() {
         final JsonParser parser = Json.createParserFactory(new HashMap<String, Object>() {{
             put(JsonParserFactoryImpl.MAX_STRING_LENGTH, 10);
@@ -1069,7 +1094,7 @@
         assertEquals(JsonParser.Event.VALUE_NULL, parser.next());
         parser.close();
     }
-    
+
     @Test
     public void maxStringStringOK() {
         // using a reader as wrapper of parser
@@ -1078,9 +1103,9 @@
                 put("org.apache.johnzon.max-string-length", "5");
             }
         }).createReader(new ByteArrayInputStream("[\"abcde\"]".getBytes())).read();
-       
+
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void maxStringStringFail() {
         // using a reader as wrapper of parser
@@ -1089,9 +1114,9 @@
                 put("org.apache.johnzon.max-string-length", "5");
             }
         }).createReader(new ByteArrayInputStream("[\"abcdef\"]".getBytes())).read();
-       
+
     }
-    
+
     @Test
     public void maxStringNumberOK() {
         // using a reader as wrapper of parser
@@ -1100,9 +1125,9 @@
                 put("org.apache.johnzon.max-string-length", "5");
             }
         }).createReader(new ByteArrayInputStream("[12.3]".getBytes())).read();
-       
+
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void maxStringNumberFail() {
         // using a reader as wrapper of parser
@@ -1111,9 +1136,9 @@
                 put("org.apache.johnzon.max-string-length", "5");
             }
         }).createReader(new ByteArrayInputStream("[12.333]".getBytes())).read();
-       
+
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void maxStringWhitespace() {
         // using a reader as wrapper of parser
@@ -1122,10 +1147,10 @@
                 put("org.apache.johnzon.max-string-length", "5");
             }
         }).createReader(new ByteArrayInputStream("[\"12\"           ]".getBytes())).read();
-       
+
     }
-    
-    
+
+
     @Test
     public void testEmptyArray() {
        JsonParser parser = Json.createParser(new ByteArrayInputStream("[]".getBytes()));
@@ -1139,451 +1164,451 @@
             //expected
         }
     }
-    
-    
+
+
     @Test(expected = JsonParsingException.class)
     public void fail1() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail1.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail2() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail2.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail3() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail3.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail4() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail4.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail5() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail5.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail6() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail6.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail7() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail7.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail8() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail8.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail9() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail9.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail10() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail10.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail11() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail11.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail12() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail12.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail13() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail13.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail14() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail14.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail15() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail15.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail16() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail16.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail17() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail17.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail18() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail18.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail19() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail19.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail20() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail20.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail21() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail21.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail22() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail22.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail23() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail23.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail24() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail24.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail25() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail25.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail26() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail26.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail27() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail27.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail28() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail28.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail29() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail29.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail30() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail30.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail31() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail31.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail32() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail32.json")).read();
     }
-    
-    
+
+
     @Test(expected = JsonParsingException.class)
     public void fail33() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail33.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail34() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail34.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail35() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail35.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail36() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail36.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail37() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail37.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail38() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail38.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail39() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail39.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail40() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail40.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail41() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail41.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail42() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail42.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail43() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail43.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail44() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail44.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail45() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail45.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail46() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail46.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail47() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail47.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail48() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail48.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail49() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail49.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail50() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail50.json")).read();
     }
-    
+
     //@Test(expected = JsonParsingException.class)
     public void fail51() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail51.json")).read();
     }
-    
+
     //@Test(expected = JsonParsingException.class)
     public void fail52() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail52.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail53() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail53.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail54() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail54.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail55() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail55.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail56() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail56.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail57() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail57.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail58() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail58.json")).read();
     }
-    
+
     @Test(expected = JsonException.class)
     public void fail59() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail59.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail60() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail60.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail61() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail61.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail62() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail62.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail63() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail63.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail64() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail64.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail65() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail65.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail66() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail66.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail67() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail67.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail68() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail68.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail69() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail69.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail70() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail70.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail71() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail71.json")).read();
     }
-    
+
     @Test(expected = JsonParsingException.class)
     public void fail72() {
-        
+
         Json.createReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("json/fails/fail72.json")).read();
     }
-    
-    
+
+
     @Test
     public void stringescapeVariousBufferSizesBogus() {
-        
+
 
         StringBuilder sb = new StringBuilder();
         sb.append("\t\"special-\":" + "\"" + "\\\\f\\n\\r\\t\\u6565\uDC00\uD800" + "\",\n");
         sb.append("\t\"unicode-\\u0000- \":\"\\u5656\uDC00\uD800\"\n");
         String s = "{"+sb.toString()+"}";
-       
+
         for (int i = 1; i < s.length()+100; i++) {
             final String value = String.valueOf(i);
 
@@ -1593,42 +1618,42 @@
                 }
             }).createParser(new ByteArrayInputStream(s.getBytes()));
             assertNotNull(parser);
-            
+
             while(parser.hasNext()) {
                 Event e = parser.next();
                 if(e==null) {
                     fail();
                 }
             }
-            
+
             assertTrue(!parser.hasNext());
             parser.close();
-            
+
         }
     }
-    
+
     class AttemptingInputStream extends ByteArrayInputStream {
 
         public AttemptingInputStream(byte[] buf) {
             super(buf);
-            
+
         }
 
         @Override
         public synchronized int read(byte b[], int off, int len) {
-            
+
             if (b == null) {
                 throw new NullPointerException();
             } else if (off < 0 || 1 > b.length - off) {
                 throw new IndexOutOfBoundsException();
             }
-         
+
             if (pos >= count) {
                 return -1;
             }
 
             int avail = count - pos;
-            
+
             if (avail == 0) {
                 return 0;
             }
