From: Patric Plitzner
Date: Wed, 18 Jun 2014 07:08:36 +0000 (+0000)
Subject: - fixed potential session exceptions during closing/saving
X-Git-Tag: 3.6.0~556
X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/commitdiff_plain/bf083966ba1766815f35d7897c9f2805571f2279
- fixed potential session exceptions during closing/saving
---
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateView.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateView.java
index 4b0a5bad1..2ae721e3c 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateView.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateView.java
@@ -301,6 +301,9 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
*/
@Override
public void workbenchShutdown(IMemento memento, IProgressMonitor monitor) {
+ if (!conversation.isBound()) {
+ conversation.bind();
+ }
conversation.close();
// if(memento == null){
// return;
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateSearchView.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateSearchView.java
index 142bdbdb8..ddd4b1a20 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateSearchView.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateSearchView.java
@@ -1,12 +1,12 @@
// $Id$
/**
-* Copyright (C) 2013 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
+ * Copyright (C) 2013 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
package eu.etaxonomy.taxeditor.view.derivateSearch;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -101,7 +101,7 @@ public class DerivateSearchView extends ViewPart implements IContextListener {
*/
@Override
public void workbenchShutdown(IMemento memento, IProgressMonitor monitor) {
- if(getConversationHolder()!=null){
+ if(getConversationHolder()!=null && getConversationHolder().isBound() && !getConversationHolder().isClosed()) {
getConversationHolder().close();
}
}