[443622] Avoiding NPEs when adding delegate annotations.
diff --git a/plugins/org.eclipse.uml2.common-feature/feature.xml b/plugins/org.eclipse.uml2.common-feature/feature.xml
index e0bcf3d..3787989 100644
--- a/plugins/org.eclipse.uml2.common-feature/feature.xml
+++ b/plugins/org.eclipse.uml2.common-feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.uml2.common"
label="%feature.label"
- version="2.0.0.qualifier"
+ version="2.0.1.qualifier"
provider-name="%feature.provider-name"
image="eclipse_update_120.jpg"
license-feature="org.eclipse.uml2.license"
diff --git a/plugins/org.eclipse.uml2.common/META-INF/MANIFEST.MF b/plugins/org.eclipse.uml2.common/META-INF/MANIFEST.MF
index 3a855f4..c61b6f0 100644
--- a/plugins/org.eclipse.uml2.common/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.uml2.common/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.uml2.common; singleton:=true
-Bundle-Version: 2.0.0.qualifier
+Bundle-Version: 2.0.1.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.uml2.common/src/org/eclipse/uml2/common/util/UML2Util.java b/plugins/org.eclipse.uml2.common/src/org/eclipse/uml2/common/util/UML2Util.java
index aa32848..7f3fe6f 100644
--- a/plugins/org.eclipse.uml2.common/src/org/eclipse/uml2/common/util/UML2Util.java
+++ b/plugins/org.eclipse.uml2.common/src/org/eclipse/uml2/common/util/UML2Util.java
@@ -9,7 +9,7 @@
* IBM - initial API and implementation
* Kenn Hussey (Embarcadero Technologies) - 204200, 247980
* Keith Campbell (IBM) - 343783
- * Kenn Hussey (CEA) - 316165, 322715, 212765, 421756, 424568
+ * Kenn Hussey (CEA) - 316165, 322715, 212765, 421756, 424568, 443662
* Christian W. Damus (CEA) - 405065
*
*/
@@ -1293,7 +1293,7 @@
String invocationDelegate) {
boolean result = false;
- if (!isEmpty(invocationDelegate)) {
+ if (ePackage != null && !isEmpty(invocationDelegate)) {
List<String> invocationDelegates = EcoreUtil
.getInvocationDelegates(ePackage);
@@ -1325,10 +1325,9 @@
*/
protected static boolean addSettingDelegate(EPackage ePackage,
String settingDelegate) {
-
boolean result = false;
- if (!isEmpty(settingDelegate)) {
+ if (ePackage != null && !isEmpty(settingDelegate)) {
List<String> settingDelegates = EcoreUtil
.getSettingDelegates(ePackage);
@@ -1347,7 +1346,7 @@
String validationDelegate) {
boolean result = false;
- if (!isEmpty(validationDelegate)) {
+ if (ePackage != null && !isEmpty(validationDelegate)) {
List<String> validationDelegates = EcoreUtil
.getValidationDelegates(ePackage);