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.
I mean for user looking at SyntaxType code not for JVM. Theses methods are mainly here for there comments indicating to a user he can safely use it has a Map key.
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?
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne