Thanks for the input.
I created https://issues.apache.org/jira/browse/SLING-5757 for tracking that 
and I am going to propose a patch in there.

What about SyntheticResources which are not NonExistingResources? If we would 
follow the same approach as for NonExistingResources the question is, with 
which resource type the non-existing parent resource should be created? Or 
should a SyntheticResource (which is not a NonExistingResource) return a 
NonExistingResource for getParent() instead in that case?

Konrad


> On 02 Jun 2016, at 13:47, Daniel Klco <dk...@apache.org> wrote:
> 
> I would imagine that the only thing this would change is to make a small
> number of null checks irrelevant.
> 
> +1 for making the behavior more consistent, however, the JavaDocs and
> release notes should be explicit about this change.
> 
> On Thu, Jun 2, 2016 at 4:45 AM, Georg Henzler <slin...@ghenzler.de> wrote:
> 
>> Hi Konrad,
>> 
>> +1 for making the behaviour of NonExistingResource more consistent - I
>> personally can't think of any places this would break existing code.
>> 
>> Regards
>> Georg
>> 
>> 
>> 
>> On 2016-06-01 15:09, Konrad Windszus wrote:
>> 
>>> Hi Robert,
>>> thanks for your input.
>>> 
>>> 
>>>> I am not sure whether this would confuse existing clients though...
>>>> 
>>> 
>>> I am also a bit worried about that but the only example I could think
>>> of is a code trying to create the parent nodes or collecting the
>>> non-existing ones by checking getParent() for null.
>>> 
>>> This would be pretty bad style IMHO therefore I would deliberately be
>>> willing to break that code. I wonder what do others think about
>>> changing the semantics of getParent() for NonExistingResource and
>>> probably also SyntheticResource.
>>> Konrad
>>> 
>> 
>> 

Reply via email to