Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPauline DEVILLE2016-10-10 14:09:32 +0000
committerPauline DEVILLE2016-10-10 14:09:32 +0000
commita4d5cdad3ec24be895ebec776815705bb3d6fd94 (patch)
tree1bbfcd567e0f93a6855a52235c48368812c5e285 /plugins/infra/nattable
parent44da6bdbd6e97d173ea27b4ea25346167df83844 (diff)
downloadorg.eclipse.papyrus-a4d5cdad3ec24be895ebec776815705bb3d6fd94.tar.gz
org.eclipse.papyrus-a4d5cdad3ec24be895ebec776815705bb3d6fd94.tar.xz
org.eclipse.papyrus-a4d5cdad3ec24be895ebec776815705bb3d6fd94.zip
Bug 504039 - NullPointerException below
CreateNatTableFromCatalogHandler$1.dispose (thrown in HashMap.putMapEntries) Change-Id: I2a86e8fc584edeec4884c0a173b0f9af7a7deba7 Signed-off-by: Pauline DEVILLE <pauline.deville@cea.fr>
Diffstat (limited to 'plugins/infra/nattable')
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/CreateNatTableFromCatalogHandler.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/CreateNatTableFromCatalogHandler.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/CreateNatTableFromCatalogHandler.java
index fba7df713cd..0493ad10b74 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/CreateNatTableFromCatalogHandler.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/CreateNatTableFromCatalogHandler.java
@@ -112,7 +112,7 @@ public class CreateNatTableFromCatalogHandler extends AbstractHandler {
* The view prototypes to create by the table creation wizard.
*/
private Map<ViewPrototype, Integer> viewPrototypes = null;
-
+
/**
* The view prototypes names of the table to create (names from wizard).
*/
@@ -128,14 +128,16 @@ public class CreateNatTableFromCatalogHandler extends AbstractHandler {
@Override
public Object execute(final ExecutionEvent event) throws ExecutionException {
final EObject context = getSelection().get(0);
- final CreateNattableFromCatalogWizard wizard = new CreateNattableFromCatalogWizard(context){
-
+ final CreateNattableFromCatalogWizard wizard = new CreateNattableFromCatalogWizard(context) {
+
@Override
public void dispose() {
// Get the view prototypes and the table names before the dispose values
// Create a new hashmap because the reference must be deleted with the dispose
- viewPrototypes = new HashMap<ViewPrototype, Integer>(this.getSelectedViewPrototypes());
- tableNames = new HashMap<ViewPrototype, String>(this.getTableNames());
+ if (this.getSelectedViewPrototypes() != null && this.getTableNames() != null) {
+ viewPrototypes = new HashMap<ViewPrototype, Integer>(this.getSelectedViewPrototypes());
+ tableNames = new HashMap<ViewPrototype, String>(this.getTableNames());
+ }
super.dispose();
}
};
@@ -151,7 +153,7 @@ public class CreateNatTableFromCatalogHandler extends AbstractHandler {
}
if (Window.OK == dialog.open()) {
-
+
final RecordingCommand rc = new RecordingCommand(domain) {
@Override

Back to the top