On Wed, Oct 8, 2008 at 1:52 PM, Sergiu Dumitriu <[EMAIL PROTECTED]> wrote:
> Thomas Mortagne wrote:
>> On Wed, Oct 8, 2008 at 11:44 AM, Sergiu Dumitriu <[EMAIL PROTECTED]> wrote:
>>> tmortagne (SVN) wrote:
>>>> Author: tmortagne
>>>> Date: 2008-10-07 20:01:06 +0200 (Tue, 07 Oct 2008)
>>>> New Revision: 13383
>>>>
>>>> Modified:
>>>>    
>>>> platform/core/trunk/xwiki-rendering/src/main/java/org/xwiki/rendering/parser/SyntaxType.java
>>>> Log:
>>>> XWIKI-2744: Can't add a Parser component for an unknown syntax
>>>> * add equals and hashCode methods
>>>>
>>> Since these methods do nothing but the default, why do we need to
>>> override them? The inherited methods should be enough, no?
>>
>> To explicitly indicate SyntaxType can be used as Map key.
>
> WDYM? A map can hold anything, there's no requirement to override
> equals/hashCode. If they do exactly what Object does, there's no need to
> override, since the behavior is the same.
>
>>> Anyway, I'd rather have a real implementation, since we can't be sure
>>> that everybody will create syntaxes using the factory method.
>>
>> The constructor is private so we are sure everyone will have to use
>> the factory to create SyntaxType.
>>
>
> How does this go with distributed containers, distributed shared memory,
> serialized objects, RMI and other ways an object can be created without
> manually calling the constructor?

If those uses cases SyntaxType is far from beying used for yes there
will be a problem... anyway if you think it's really needed you can
modify theses methods, I'm not that strongly against the idea ;)

>
> --
> Sergiu Dumitriu
> http://purl.org/net/sergiu/
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
>



-- 
Thomas Mortagne
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to