+0.5 I'm aware of this contract but just did check when the NonExistingResource would be valid to be used. Looking at [0] you could read this to be a correct behavior as well. There is currently a gap between the behavior of .resolve() and .getResource() where getResource would return null and .resolve() should return a NonExistingResource. I'm pretty sure there is a reason for that, but I couldn't find it. So could anyone enlighten me befor I can give full +1 from my side? :)
Best regards Dominik [0] http://sling.apache.org/apidocs/sling5/org/apache/sling/api/resource/Resource.html#RESOURCE_TYPE_NON_EXISTING On Mon, Dec 16, 2013 at 11:54 AM, Felix Meschberger <[email protected]>wrote: > Hi > > Are you talking about "ResourceAccessSecurityImpl.getReadableResource" ? > Yes, I agree, that returning NonExistingResource is indeed violating the > API spec which states null is to be returned if the resource is not > readable. > > Regards > Felix > > Am 16.12.2013 um 08:00 schrieb Carsten Ziegeler <[email protected]>: > > > Hi, > > > > while looking at the ResourceAccessSecurity implementation I noticed that > > it returns a NonExistingResource if read access is denied. I think it > > simply should return null. > > > > Thoughts? > > > > Regards > > Carsten > > -- > > Carsten Ziegeler > > [email protected] > >
