sefasdfasd / google-gson

Automatically exported from code.google.com/p/google-gson
0 stars 0 forks source link

ArrayIndexOutOfBoundsException on parsing "/" as a JSON document #409

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It's an invalid document but we're crashing the wrong way. The problem has to 
do with how we handle the nonexecute prefix. We might have a more severe 
problem hiding here, particularly for source readers that feed data one 
character at a time.

  public void testStringEndingInSlash() throws IOException {
    JsonReader reader = new JsonReader(new StringReader("/"));
    reader.setLenient(true);
    assertEquals(JsonToken.END_DOCUMENT, reader.peek());
  }

Original issue reported on code.google.com by limpbizkit on 11 Feb 2012 at 7:51

GoogleCodeExporter commented 9 years ago

Original comment by limpbizkit on 18 Mar 2012 at 6:16