Skip to content

Commit

Permalink
Merge pull request square#3013 from square/jakew/converter-data-leak/…
Browse files Browse the repository at this point in the history
…2019-01-22

Ensure JAX-B converter closes its body on error
  • Loading branch information
swankjesse authored Jan 23, 2019
2 parents 415e780 + ac5c197 commit 23e3313
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ final class JaxbResponseConverter<T> implements Converter<ResponseBody, T> {
return unmarshaller.unmarshal(streamReader, type).getValue();
} catch (JAXBException | XMLStreamException e) {
throw new RuntimeException(e);
} finally {
value.close();
}
}
}

0 comments on commit 23e3313

Please sign in to comment.