michalcukierman commented on code in PR #1:
URL:
https://github.com/apache/sling-org-apache-sling-bundleresource-impl/pull/1#discussion_r934590705
##########
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:
@joerghoh are you thinking about default resource types across all resource
providers? Lets say: `sling/default/file`, `sling/deafult/folder` or
`sling/default/unstructure`?
Or rather to introduce something specific to BundleResource, like we have it
in ServletResource superType
[here](https://github.com/apache/sling-org-apache-sling-servlets-resolver/blob/0e3cdecc9cf4f88a740ba5fc86dec8d1dc9e2c17/src/main/java/org/apache/sling/servlets/resolver/internal/resource/ServletResource.java#L40)?
--
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]