You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2022/08/01 12:28:20 UTC

[GitHub] [sling-org-apache-sling-bundleresource-impl] michalcukierman commented on a diff in pull request #1: BundleResource/JcrNodeResource getResourceType fallback consistency

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: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org