Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgkumarctr2016-07-07 08:29:42 +0000
committergkumarctr2016-07-07 08:29:42 +0000
commit9a08aa9fe1d77d09f181d393afa1d45bbf7299fa (patch)
treece147e67684f7815f31fd0375624d319798f250c
parentf42770402a067a0e9b3cc3de52aa18f951954362 (diff)
downloadorg.eclipse.emf.eson-9a08aa9fe1d77d09f181d393afa1d45bbf7299fa.tar.gz
org.eclipse.emf.eson-9a08aa9fe1d77d09f181d393afa1d45bbf7299fa.tar.xz
org.eclipse.emf.eson-9a08aa9fe1d77d09f181d393afa1d45bbf7299fa.zip
NPE in EFactoryAdapter.removeListValue(EFactoryAdapter.java:239)
Change-Id: Id00622b949488a67b62369a141044875ecc2696e Signed-off-by: gkumarctr <girish1661@gmail.com>
-rw-r--r--plugins/org.eclipse.emf.eson/src/org/eclipse/emf/eson/serialization/EFactoryAdapter.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.eson/src/org/eclipse/emf/eson/serialization/EFactoryAdapter.java b/plugins/org.eclipse.emf.eson/src/org/eclipse/emf/eson/serialization/EFactoryAdapter.java
index 50da551..042e3a3 100644
--- a/plugins/org.eclipse.emf.eson/src/org/eclipse/emf/eson/serialization/EFactoryAdapter.java
+++ b/plugins/org.eclipse.emf.eson/src/org/eclipse/emf/eson/serialization/EFactoryAdapter.java
@@ -236,7 +236,12 @@ public class EFactoryAdapter extends EContentAdapter {
protected void removeListValue(Feature factoryFeature, final Notification msg, Resource resource) {
MultiValue multiValue = (MultiValue) factoryFeature.getValue();
int indexToRemove = msg.getPosition();
- multiValue.getValues().remove(indexToRemove);
+ if(multiValue != null){
+ EList<Value> values = multiValue.getValues();
+ if(values != null && values.size() > indexToRemove){
+ values.remove(indexToRemove);
+ }
+ }
}
protected void removeManyListValues(Feature factoryFeature, final Notification msg, Resource resource) {

Back to the top