diff options
Diffstat (limited to 'bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/events/BuildCommand.java')
-rw-r--r-- | bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/events/BuildCommand.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/events/BuildCommand.java b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/events/BuildCommand.java index 1ab24b9c6..49962eadb 100644 --- a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/events/BuildCommand.java +++ b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/events/BuildCommand.java @@ -149,14 +149,15 @@ public class BuildCommand extends ModelObject implements ICommand { } /** - * @return Map {@link IBuildConfiguration} -> {@link IncrementalProjectBuilder} if + * @return A copy of the internal map {@link IBuildConfiguration} -> {@link IncrementalProjectBuilder} if * this build command supports multiple configurations. Otherwise return the {@link IncrementalProjectBuilder} * associated with this build command. */ public Object getBuilders() { synchronized (builderLock) { - if (supportsConfigs()) - return builders; + if (supportsConfigs()) { + return builders == null ? null : new HashMap<>(builders); + } return builder; } } |