getCauseOfBlockage

2 messages Options
Embed this post
Permalink
mindless

getCauseOfBlockage

Reply Threaded More More options
Print post
Permalink
Hi all-
Just wanted to note this new API has no backward compatibility code, so
there is a possibility to hit exceptions with pre-1.330 plugins..
however, the chance is remote so maybe nothing needs to be done..
thought I'd mention it though.

Queue.BlockedItem.getCauseOfBlockage() can call
task.getCauseOfBlockage().  On older plugins compiled before this API
was added to the Task interface, this results in AbstractMethodError.
I noticed this when working on batch-task plugin, but I didn't figure
out how to reach that line in BlockedItem.. I was only able to block a
task in the queue when blocked by itself of its project, and these cases
are handled by the getBlockingActivity() part, so getCauseOfBlockage is
not called on the task.

so, just FYI but as I said, maybe too much of an edge case to worry about.

    - Alan



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Kohsuke Kawaguchi-2

Re: getCauseOfBlockage

Reply Threaded More More options
Print post
Permalink

Thanks. When the caller is Jelly, I believe exceptions are swallowed
without causing a catastrophic failure, so hopefully this issue isn't
too much of a problem.

There are several interfaces in the system, and so occasionally we have
no choice but to introduce a possible AbstractMethodError.

Alan Harder wrote:

> Hi all-
> Just wanted to note this new API has no backward compatibility code, so
> there is a possibility to hit exceptions with pre-1.330 plugins..
> however, the chance is remote so maybe nothing needs to be done..
> thought I'd mention it though.
>
> Queue.BlockedItem.getCauseOfBlockage() can call
> task.getCauseOfBlockage().  On older plugins compiled before this API
> was added to the Task interface, this results in AbstractMethodError.
> I noticed this when working on batch-task plugin, but I didn't figure
> out how to reach that line in BlockedItem.. I was only able to block a
> task in the queue when blocked by itself of its project, and these cases
> are handled by the getBlockingActivity() part, so getCauseOfBlockage is
> not called on the task.
>
> so, just FYI but as I said, maybe too much of an edge case to worry about.
>
>     - Alan
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
       

--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/


smime.p7s (4K) Download Attachment