[
https://issues.apache.org/jira/browse/NUTCH-2346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15837625#comment-15837625
]
Sebastian Nagel edited comment on NUTCH-2346 at 1/25/17 12:12 PM:
------------------------------------------------------------------
Hi,
o.a.n.protocol.TestContent now fails in line 50
{code}
WritableTestUtils.testWritable(r);
{code}
because assertEquals on o.a.n.metadata.SpellCheckedMetadata and
o.a.n.metadata.Metadata fails. The latter is a copy of the former via
readFields/write. SpellCheckedMetadata differs only how getters and setters are
implemented, but not what metadata is stored and how it's stored. Maybe, a
weaker condition in the equals method,
{code}
if (!Metadata.class.isAssignableFrom(o.getClass())) {
{code}
instead of
{code}
if (this.getClass() != o.getClass()) {
{code}
is acceptable?
was (Author: wastl-nagel):
Hi,
o.a.n.protocol.TestContent now fails in line 50
{code}
WritableTestUtils.testWritable(r);
{code}
because assertEquals on o.a.n.metadata.SpellCheckedMetadata and
o.a.n.metadata.Metadata fails. The latter is a copy of the former via
readFields/write. SpellCheckedMetadata differs only how getters and setters are
implemented, but not what metadata is stored and how it's stored. Maybe, a
weaker condition in the equals method,
{code}
if (!Metadata.class.isAssignableFrom(o.getClass())) {
{code}
instead of
{code}
if (this.getClass() != o.getClass()) {
{code}
is acceptable.
> Check Types at Object Equality
> ------------------------------
>
> Key: NUTCH-2346
> URL: https://issues.apache.org/jira/browse/NUTCH-2346
> Project: Nutch
> Issue Type: Bug
> Components: generator, metadata
> Affects Versions: 2.3.1
> Reporter: Furkan KAMACI
> Assignee: Furkan KAMACI
> Priority: Minor
> Fix For: 2.4
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)