Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2018-07-16 15:01:26 -0400
committerJeff Johnston2018-07-16 16:33:42 -0400
commit7ff72bbc8f6270c1e2f0525850d11712ec7306ef (patch)
tree72e5904d4e450ab9a6bf39f81d3dfeacf5c54352
parent6b918885269f945f5375f24c468eacce3c117531 (diff)
downloadorg.eclipse.linuxtools-7ff72bbc8f6270c1e2f0525850d11712ec7306ef.tar.gz
org.eclipse.linuxtools-7ff72bbc8f6270c1e2f0525850d11712ec7306ef.tar.xz
org.eclipse.linuxtools-7ff72bbc8f6270c1e2f0525850d11712ec7306ef.zip
Bug 537086 - NullPointerException in RefreshCommandHandler.execute
- fix RefreshCommandHandler to look at jobs list entries for null since the list can contain null values if connections are not available Change-Id: I4e40d7a7c1a1bc347e55dde55916b4bfe9b624f9 Reviewed-on: https://git.eclipse.org/r/126134 Tested-by: CI Bot Reviewed-by: Jeff Johnston <jjohnstn@redhat.com> (cherry picked from commit b2796c2e734a43c717b9412ba3e88474b1e710c7) Reviewed-on: https://git.eclipse.org/r/126138
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RefreshCommandHandler.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RefreshCommandHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RefreshCommandHandler.java
index 7cad893d90..afddd63102 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RefreshCommandHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RefreshCommandHandler.java
@@ -55,9 +55,11 @@ public class RefreshCommandHandler extends AbstractHandler {
final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
final List<Job> jobs = getRefreshJobs(activePart);
for (Job job : jobs) {
- job.setPriority(Job.LONG);
- job.setUser(true);
- job.schedule();
+ if (job != null) {
+ job.setPriority(Job.LONG);
+ job.setUser(true);
+ job.schedule();
+ }
}
return null;
}

Back to the top