You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Martin Grigorov <mg...@apache.org> on 2015/11/10 09:45:43 UTC

Re: wicket git commit: WICKET-6029 Make Border's methods consistent with commit f14e03f

On Mon, Nov 9, 2015 at 10:42 PM, <ad...@apache.org> wrote:

> +               if (body.getId().equals(replacement.getId()))
>

Why not identity check as the other places?

This may fail if there are two Borders with the same id in the hierarchy.
Very unlikely to replace their bodies though.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

Re: wicket git commit: WICKET-6029 Make Border's methods consistent with commit f14e03f

Posted by andrea del bene <an...@gmail.com>.

On 10/11/2015 09:45, Martin Grigorov wrote:
> On Mon, Nov 9, 2015 at 10:42 PM, <ad...@apache.org> wrote:
>
>> +               if (body.getId().equals(replacement.getId()))
>>
> Why not identity check as the other places?
>
> This may fail if there are two Borders with the same id in the hierarchy.
> Very unlikely to replace their bodies though.
Good point. Initially it was an identity check as the others, but then I 
thought that in this case it might not have sense. With an identity 
check we are telling something like "replace body with...itself?". So I 
thought that checking for the same body's id is more rational. But as 
you said it's very unlikely that somebody will replace body component....
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>