Bug 505922 - Relax the error handling requirements for JobManager.beginTask
Summary: Relax the error handling requirements for JobManager.beginTask
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 4.6   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: platform-runtime-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-13 14:14 EDT by Stefan Xenos CLA
Modified: 2016-10-14 01:51 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Xenos CLA 2016-10-13 14:14:08 EDT
The current contract on JobManager.beginTask requires that the caller also calls endTask even if the call to beginTask fails.

This is an unusual convention which is different from almost everything else in java, and as a consequence a lot of callers have gotten it wrong (many callers invoke beginTask outside of the try block rather than inside it).

We should consider making beginTask clean everything up in the event of a failure and make the subsequent call to endTask optional.
Comment 1 Lars Vogel CLA 2016-10-14 01:51:53 EDT
+1