Summary: | Replace SubProgressMonitor by SubMonitor in org.eclipse.core.internal.utils.Policy | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Christopher Gerking <christopher.gerking> | ||||
Component: | Resources | Assignee: | Platform-Resources-Inbox <platform-resources-inbox> | ||||
Status: | NEW --- | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | ||||||
Version: | 4.17 | ||||||
Target Milestone: | --- | ||||||
Hardware: | PC | ||||||
OS: | Windows 10 | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Christopher Gerking
2020-09-15 09:21:22 EDT
Created attachment 284136 [details]
Policy patch
The patch does the conversion to SubMonitor only once for each monitor, thereby preventing the above contract violations.
Changing the return types from IProgressMonitor to SubMonitor should be consistent with the Liskov substitution principle.
The code uses SubMonitor.newChild(...) instead of split(...) to preserve the current behavior without checking for cancellation. If these checks are desirable, use split(...) instead.
|