If the run is an abstractbuild instance (and there is the possibility
that it may not) then you can cast away
i.e.
if (run instanceof AbstractBuild)
list.add(AbstractBuild.class.cast(run)); else // help I am stuck
and you really are stuck at that point, if you have a project type
which produces Run instances that are not abstract builds.... for
99.999% of users that will be an edge case, but you *should* but some
error handling into your code to handle/warn the user in such edge
cases.
-Stephen
On 27 June 2012 10:43, MaxiTrompe <mtromp...@gmail.com> wrote:
> Hello,
> I am trying to add features to the existing promoted builds plugin.
> I am stuck at a point where I want to add a Run object to an
> AbstractBuild<?,?> list.
> I was wondering if their was any way to do so, like casting a run into an
> abstractbuild.
> It would be great if someone knew how to do so,
> Thank you