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 18:10:44 UTC

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

kwin commented on code in PR #1:
URL: https://github.com/apache/sling-org-apache-sling-bundleresource-impl/pull/1#discussion_r934789176


##########
src/main/java/org/apache/sling/bundleresource/impl/BundleResource.java:
##########
@@ -229,7 +228,11 @@ public String getPath() {
 
     @Override
     public String getResourceType() {
-        return this.valueMap.get(ResourceResolver.PROPERTY_RESOURCE_TYPE, String.class);
+        String resourceType = this.valueMap.get(ResourceResolver.PROPERTY_RESOURCE_TYPE, String.class);
+        if ( resourceType == null ) {
+            resourceType = this.isFolder ? NT_FOLDER : NT_FILE;

Review Comment:
   For me using completely JCR agnostic resource types should be tracked in a follow-up PR. IMHO this PR is only about removing the resource type from the valueMap.



-- 
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