On 16 Apr 2009, at 15:47, Clint Popetz wrote:
On Thu, Apr 16, 2009 at 12:26 AM, Nicklas Karlsson
<nickarls(a)gmail.com> wrote:
> Makes sense if there are no other objections
Ok, hearing done, committed. I'll back it out if there are
objections.
> And on a related note, should the proxy delegate equals/hashCode to
> the instance?
I assume you mean "is it wrong that it currently does?" as opposed to
"should we make it do so," because afaict it doesnt special case, and
just delegates all invocations after ensuring the proxied instance
exists. I think that that's the correct behavior with respect to
equals/hashcode. It does mean that if you put contextual beans in a
collection and then use the collection when that context is no longer
current, so that the proxied instances in the elements could be
different and therefore respond differently to equals/hashcode, you
will get undefined behavior. I think that's what you deserve in that
case :)
Right, Javassist passes equals and hashcode through by default - and I
agree, bean equality is correct, not proxy instance equality
-Clint
> On Thu, Apr 16, 2009 at 5:09 AM, Clint Popetz <cpopetz(a)gmail.com>
> wrote:
>> Hi,
>>
>> Knowing that equals()/hashCode() commits can often lead to month-
>> long
>> debates, I thought I'd ask first...is it ok to add an equals() on
>> ConversationImpl that compares cids? The reason I ask is that I
>> want
>> to put ConversationManager.getLongRunningConversations() into a
>> <select/> in my wicket example, and the built-in wicket component
>> for
>> this checks equals() to determine which is option is selected. The
>> default == test won't work because of proxies. (It also seems
>> reasonable to me that users would want to stick Conversations in
>> collections.)
>>
>> Thanks,
>> -Clint
>> _______________________________________________
>> webbeans-dev mailing list
>> webbeans-dev(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/webbeans-dev
>>
>
>
>
> --
> ---
> Nik
>
_______________________________________________
webbeans-dev mailing list
webbeans-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/webbeans-dev
--
Pete Muir
http://www.seamframework.org
http://in.relation.to/Bloggers/Pete