mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 08:55:25 +02:00
Bug 574057: Prevent null set of selected data volumes
Prefer an empty set instead. Change-Id: I6b13f78ffbbbe0cbac2b69ad50abdc90f15fed66
This commit is contained in:
parent
087e0e4a3e
commit
48ff7a223d
2 changed files with 7 additions and 1 deletions
|
@ -911,7 +911,7 @@ public class ContainerPropertyTab extends AbstractCBuildPropertyTab
|
|||
}
|
||||
imageCombo.setText(""); //$NON-NLS-1$
|
||||
model.setDataVolumes(null);
|
||||
model.setSelectedDataVolumes(null);
|
||||
model.setSelectedDataVolumes(new HashSet<>());
|
||||
enableButton.setSelection(false);
|
||||
setControlsEnabled(false);
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ import java.util.List;
|
|||
import java.util.Set;
|
||||
|
||||
import org.eclipse.core.databinding.observable.list.WritableList;
|
||||
import org.eclipse.core.runtime.Assert;
|
||||
import org.eclipse.linuxtools.docker.core.DockerException;
|
||||
import org.eclipse.linuxtools.docker.core.IDockerConnection;
|
||||
import org.eclipse.linuxtools.docker.core.IDockerImage;
|
||||
|
@ -129,7 +130,12 @@ public class ContainerPropertyVolumesModel extends BaseDatabindingModel {
|
|||
return selectedDataVolumes;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param selectedDataVolumes non-<code>null</code> set of selected data volumes
|
||||
*/
|
||||
public void setSelectedDataVolumes(final Set<DataVolumeModel> selectedDataVolumes) {
|
||||
Assert.isNotNull(selectedDataVolumes);
|
||||
firePropertyChange(SELECTED_DATA_VOLUMES, this.selectedDataVolumes,
|
||||
this.selectedDataVolumes = selectedDataVolumes);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue