Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
Description
At the moment, HDC Task start/stop should be coded like this:
Task task1; try { task1 = HDC.getCurrentTask().startSubtask("task1"); // do something... } finally { task1.stop(); }
That could be simplified like this if Task extends AutoCloseable with a default method, #close(), which simply invokes #stop() method:
try (Task task1 = HDC.getCurrentTask().startSubtask("task1")) { task1 = HDC.getCurrentTask().startSubtask("task1"); // do something... }
Attachments
Issue Links
- causes
-
CMS-14875 HST Diagnostics: WARN pollution by DefaultTaskImpl
- Closed