Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Merks2022-05-16 11:17:45 +0000
committerEd Merks2022-05-16 11:17:45 +0000
commit9125bbcfb43cc6d64ccdd196074417c5f6e3622a (patch)
tree983ebdf4b25c89f366ac87c0adf024410a666038
parentd25929249b0206c8ddfd550aa689b0122f499276 (diff)
downloadorg.eclipse.emf-9125bbcfb43cc6d64ccdd196074417c5f6e3622a.tar.gz
org.eclipse.emf-9125bbcfb43cc6d64ccdd196074417c5f6e3622a.tar.xz
org.eclipse.emf-9125bbcfb43cc6d64ccdd196074417c5f6e3622a.zip
[577994] ObservableListTreeContentProvider: NPE when unsetting a
non-many feature
-rw-r--r--features/org.eclipse.emf.databinding-feature/feature.xml2
-rw-r--r--features/org.eclipse.emf.databinding-feature/pom.xml2
-rw-r--r--plugins/org.eclipse.emf.databinding/META-INF/MANIFEST.MF4
-rw-r--r--plugins/org.eclipse.emf.databinding/pom.xml2
-rw-r--r--plugins/org.eclipse.emf.databinding/src/org/eclipse/emf/databinding/internal/EMFPropertyListener.java11
5 files changed, 14 insertions, 7 deletions
diff --git a/features/org.eclipse.emf.databinding-feature/feature.xml b/features/org.eclipse.emf.databinding-feature/feature.xml
index 8840eaf81..7f7b45671 100644
--- a/features/org.eclipse.emf.databinding-feature/feature.xml
+++ b/features/org.eclipse.emf.databinding-feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.emf.databinding"
label="%featureName"
- version="1.8.0.qualifier"
+ version="1.9.0.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.emf.license"
license-feature-version="2.11.0">
diff --git a/features/org.eclipse.emf.databinding-feature/pom.xml b/features/org.eclipse.emf.databinding-feature/pom.xml
index 301892226..4b366c295 100644
--- a/features/org.eclipse.emf.databinding-feature/pom.xml
+++ b/features/org.eclipse.emf.databinding-feature/pom.xml
@@ -12,7 +12,7 @@
<groupId>org.eclipse.emf.features</groupId>
<artifactId>org.eclipse.emf.databinding</artifactId>
- <version>1.8.0-SNAPSHOT</version>
+ <version>1.9.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
</project>
diff --git a/plugins/org.eclipse.emf.databinding/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.databinding/META-INF/MANIFEST.MF
index 1f0ef310c..82a285526 100644
--- a/plugins/org.eclipse.emf.databinding/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.databinding/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.databinding; singleton:=true
-Bundle-Version: 1.5.0.qualifier
+Bundle-Version: 1.6.0.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.emf.databinding.DataBindingPlugin$Implementation
Bundle-Vendor: %providerName
@@ -11,7 +11,7 @@ Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.eclipse.emf.databinding,
org.eclipse.emf.databinding.internal;x-friends:="org.eclipse.emf.databinding.edit"
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
- org.eclipse.emf.ecore;bundle-version="[2.15.0,3.0.0)";visibility:=reexport,
+ org.eclipse.emf.ecore;bundle-version="[2.27.0,3.0.0)";visibility:=reexport,
org.eclipse.core.databinding;bundle-version="[1.3.0,2.0.0)";visibility:=reexport,
org.eclipse.core.databinding.property;bundle-version="[1.3.0,2.0.0)"
Eclipse-LazyStart: true
diff --git a/plugins/org.eclipse.emf.databinding/pom.xml b/plugins/org.eclipse.emf.databinding/pom.xml
index 4b4e0c032..9e37ddb43 100644
--- a/plugins/org.eclipse.emf.databinding/pom.xml
+++ b/plugins/org.eclipse.emf.databinding/pom.xml
@@ -11,7 +11,7 @@
</parent>
<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf.databinding</artifactId>
- <version>1.5.0-SNAPSHOT</version>
+ <version>1.6.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.emf.databinding/src/org/eclipse/emf/databinding/internal/EMFPropertyListener.java b/plugins/org.eclipse.emf.databinding/src/org/eclipse/emf/databinding/internal/EMFPropertyListener.java
index 3d66ff47b..a3d305eb6 100644
--- a/plugins/org.eclipse.emf.databinding/src/org/eclipse/emf/databinding/internal/EMFPropertyListener.java
+++ b/plugins/org.eclipse.emf.databinding/src/org/eclipse/emf/databinding/internal/EMFPropertyListener.java
@@ -132,15 +132,22 @@ public abstract class EMFPropertyListener extends AdapterImpl implements INative
}
case Notification.SET:
case Notification.RESOLVE: {
- ListDiffEntry[] listDiffEntries = new ListDiffEntry [2];
int pos = msg.getPosition();
+ Object newValue = msg.getNewValue();
// Looks like a single valued feature
if (pos == -1)
{
+ if (newValue == null)
+ {
+ // Looks like the value is removed.
+ diff = Diffs.createListDiff(Diffs.createListDiffEntry(0, false, msg.getOldValue()));
+ break;
+ }
pos = 0;
}
+ ListDiffEntry[] listDiffEntries = new ListDiffEntry [2];
listDiffEntries[0] = Diffs.createListDiffEntry(pos, false, msg.getOldValue());
- listDiffEntries[1] = Diffs.createListDiffEntry(pos, true, msg.getNewValue());
+ listDiffEntries[1] = Diffs.createListDiffEntry(pos, true, newValue);
diff = Diffs.createListDiff(listDiffEntries);
break;
}

Back to the top