RestApiServlet: Instantiate JsonReader in try-with-resources
To prevent warning about it not being closed. Change-Id: I54c76bae1e81967620287e40ec065a06f3002490
This commit is contained in:
parent
0c7780eb8a
commit
0b03d4c1c0
@ -522,8 +522,8 @@ public class RestApiServlet extends HttpServlet {
|
||||
IllegalArgumentException, NoSuchMethodException, IllegalAccessException,
|
||||
InstantiationException, InvocationTargetException, MethodNotAllowedException {
|
||||
if (isType(JSON_TYPE, req.getContentType())) {
|
||||
try (BufferedReader br = req.getReader()) {
|
||||
JsonReader json = new JsonReader(br);
|
||||
try (BufferedReader br = req.getReader();
|
||||
JsonReader json = new JsonReader(br);) {
|
||||
json.setLenient(true);
|
||||
|
||||
JsonToken first;
|
||||
|
Loading…
x
Reference in New Issue
Block a user