https://issues.apache.org/bugzilla/show_bug.cgi?id=46962

--- Comment #20 from Vincent Hennebert <vhenneb...@gmail.com> 2012-03-21 
20:41:37 UTC ---
Thanks for your patch! I have a few questions following a quick review:
* Why declare the equals and hashCode methods on interfaces (Numeric,
PercentBase)? They are defined on Object anyway, and AFAICT declaring them on
interfaces wouldn't change anything (that is, force the developer to implement
them on sub-classes?).
* Why define those methods as abstract on Property? What if a sub-class is
perfectly happy with the default implementations from Object? Also, it doesn't
allow to call super.hashCode or super.equals any more. I'm not sure at all if
this is desirable.
* Why use Double.doubleToLongBits in equals methods to compare doubles
(NumericProperty, PercentLength)? Why not just thisDouble == otherDouble? (One
could also argue that some epsilon might be necessary, but this is another
topic.)
* shouldn't the specVal field from Property also be tested for equality?

Thanks,
Vincent

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to