You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@samoa.apache.org by "Amir Rahnama (JIRA)" <ji...@apache.org> on 2015/10/13 12:03:05 UTC
[jira] [Created] (SAMOA-46) copy() in abstractOptionHandler clashes
with copy() in OptionsHandler
Amir Rahnama created SAMOA-46:
---------------------------------
Summary: copy() in abstractOptionHandler clashes with copy() in OptionsHandler
Key: SAMOA-46
URL: https://issues.apache.org/jira/browse/SAMOA-46
Project: SAMOA
Issue Type: Bug
Reporter: Amir Rahnama
In org.apache.samoa.streams package, I tried to add a new TwitterStream source so I coded a new class:
public class TwitterStreamInstance extends AbstractOptionHandler implements
InstanceStream {
}
Problem is that the copy object which in this case should be overriden becomes a bottleneck:
@Override
public MOAObject copy()
{
return null;
}
This very same issue happens when I opened FileStream.java in the same package.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
Re: [jira] [Created] (SAMOA-46) copy() in abstractOptionHandler
clashes with copy() in OptionsHandler
Posted by Gianmarco De Francisci Morales <gd...@apache.org>.
Hi,
Thanks for reporting the bug.
As far as I see, the copy method in AbstractOptionHandler is inherited from
the same interface MOAObject, which is extended by InstanceStream.
So you should tighten the return type of the copy() method and declare it
as:
@Override
public OptionHandler copy() {
return null;
}
Given that OptionHandler is a MOAObject, it should work.
Hope it helps,
--
Gianmarco
On 13 October 2015 at 13:03, Amir Rahnama (JIRA) <ji...@apache.org> wrote:
> Amir Rahnama created SAMOA-46:
> ---------------------------------
>
> Summary: copy() in abstractOptionHandler clashes with copy()
> in OptionsHandler
> Key: SAMOA-46
> URL: https://issues.apache.org/jira/browse/SAMOA-46
> Project: SAMOA
> Issue Type: Bug
> Reporter: Amir Rahnama
>
>
> In org.apache.samoa.streams package, I tried to add a new TwitterStream
> source so I coded a new class:
>
> public class TwitterStreamInstance extends AbstractOptionHandler implements
> InstanceStream {
> }
>
> Problem is that the copy object which in this case should be overriden
> becomes a bottleneck:
>
> @Override
> public MOAObject copy()
> {
> return null;
> }
>
> This very same issue happens when I opened FileStream.java in the same
> package.
>
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.3.4#6332)
>