Commit 7ead0e3
Fix SubMonitor.convert() usage in Policy.subMonitorFor() methods
The previous implementation used SubMonitor.convert(monitor, ticks) which
internally calls beginTask(), causing "beginTask may only be called once"
errors when the returned monitor is passed to code that also calls beginTask().
The correct pattern is SubMonitor.convert(monitor).split(ticks), which creates
a child monitor without calling beginTask on it, allowing the caller to call
beginTask as needed.
This fixes test failures where FussyProgressMonitor detected multiple beginTask
calls (e.g., "beginTask may only be called once (old name=Opening 'MyProject'.)").
Files changed:
- resources/bundles/org.eclipse.core.resources/.../Policy.java
- team/bundles/org.eclipse.team.core/.../Policy.java
- team/bundles/org.eclipse.team.ui/.../Policy.java
- team/bundles/org.eclipse.jsch.core/.../Policy.java
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent d76803e commit 7ead0e3
File tree
4 files changed
+4
-4
lines changed- resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/utils
- team/bundles
- org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core
- org.eclipse.team.core/src/org/eclipse/team/internal/core
- org.eclipse.team.ui/src/org/eclipse/team/internal/ui
4 files changed
+4
-4
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
0 commit comments