Campoie / rest-assured

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

convertToString in RestAssuredResponseImpl can throw NPE #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
reader can be null in:

private String convertToString(Reader reader) {
    Writer writer = new StringWriter();
    char[] buffer = new char[1024];
    try {
      int n;
      while ((n = reader.read(buffer)) != -1) {
        writer.write(buffer, 0, n);
      }
    } finally {
      reader.close();
    }
    return writer.toString();
  }

Original issue reported on code.google.com by johan.ha...@gmail.com on 3 Feb 2011 at 8:21

GoogleCodeExporter commented 9 years ago

Original comment by johan.ha...@gmail.com on 11 Feb 2011 at 4:31