On Thu, Nov 24, 2016 at 2:29 PM, Konrad Windszus <[email protected]> wrote:
> ...no change for absolute resource paths given as parameter but only for
> relative resource paths...
I think this should be symmetric: no change if comparing two absolute
resource types, but if at least one of them is relative make both
relative based on the search path.
Something like
public boolean Resource.isResourceType(String type) {
if(this.getResourceType().startsWith(SLASH) && type.startsWith(SLASH)) {
return type.equals(this.getResourceType());
} else {
return relativeType(this.getResourceType()).equals(relativeType(type));
}
Where relativeType(...) is your for loop above, testing for absolute
path before transforming.
-Bertrand