michalcukierman commented on code in PR #1:
URL:
https://github.com/apache/sling-org-apache-sling-bundleresource-impl/pull/1#discussion_r934471278
##########
src/main/java/org/apache/sling/bundleresource/impl/BundleResource.java:
##########
@@ -138,17 +135,19 @@ public BundleResource(final ResourceResolver
resourceResolver,
try {
final URL url = this.cache.getEntry(propsPath);
if (url != null) {
- final JsonObject obj =
Json.createReader(url.openStream()).readObject();
- for(final Map.Entry<String, JsonValue> entry :
obj.entrySet()) {
- final Object value = getValue(entry.getValue(),
true);
- if ( value != null ) {
- if ( value instanceof Map ) {
- if ( children == null ) {
- children = new HashMap<>();
+ try (JsonReader reader =
Json.createReader(url.openStream())) {
Review Comment:
reverted
##########
src/main/java/org/apache/sling/bundleresource/impl/BundleResource.java:
##########
@@ -186,7 +185,7 @@ Resource getChildResource(final String path) {
return result;
}
- private static Object getValue(final JsonValue value, final boolean
topLevel) {
+ private static Object getValue(final JsonValue value) {
Review Comment:
reverted
--
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]