Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFListController.java')
-rw-r--r--plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFListController.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFListController.java b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFListController.java
index 3841501a5..fbe4c61e1 100644
--- a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFListController.java
+++ b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFListController.java
@@ -13,6 +13,7 @@ package org.eclipse.eef.core.internal.controllers;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Optional;
import java.util.function.Consumer;
import org.eclipse.core.runtime.IStatus;
@@ -38,7 +39,7 @@ public class EEFListController extends AbstractEEFWidgetController implements IE
/**
* The description.
*/
- private EEFListDescription description;
+ private final EEFListDescription description;
/**
* The consumer of a new value of the list.
@@ -73,7 +74,9 @@ public class EEFListController extends AbstractEEFWidgetController implements IE
super.refresh();
String valueExpression = this.description.getValueExpression();
- this.newEval().call(valueExpression, this.newValueConsumer);
+ Optional.ofNullable(this.newValueConsumer).ifPresent(consumer -> {
+ this.newEval().call(valueExpression, consumer);
+ });
}
/**

Back to the top