kwin commented on code in PR #9:
URL:
https://github.com/apache/sling-org-apache-sling-servlets-get/pull/9#discussion_r1049404053
##########
src/test/java/org/apache/sling/servlets/get/impl/helpers/JsonRendererTest.java:
##########
@@ -182,7 +184,12 @@ public void testNumber() throws IOException {
public void testBooleansNoTidy() throws IOException {
context.currentResource("/content/booleans");
final String expected =
"{\"b2\":false,\"jcr:primaryType\":\"nt:unstructured\",\"s1\":\"true\",\"b1\":true,\"s2\":\"false\"}";
- assertEquals(expected, getJsonFromRequestResponse());
+ JsonReader jsonReader = Json.createReader(new StringReader(expected));
Review Comment:
@priyanka-28 You misunderstood, try with resources calls close
automatically, see here for the syntax:
https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html.
No need to catch any exceptions!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]