From fab146754df697273e543d018a871480c9796be4 Mon Sep 17 00:00:00 2001
From: tjc <tjc@ee4ac58c-ac51-4696-9907-e4b3aa274f04>
Date: Tue, 1 Apr 2008 10:14:42 +0000
Subject: [PATCH] fix to write embl from database entry

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@7255 ee4ac58c-ac51-4696-9907-e4b3aa274f04
---
 uk/ac/sanger/artemis/io/SimpleDocumentEntry.java | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/uk/ac/sanger/artemis/io/SimpleDocumentEntry.java b/uk/ac/sanger/artemis/io/SimpleDocumentEntry.java
index a03b6451e..985a7d902 100644
--- a/uk/ac/sanger/artemis/io/SimpleDocumentEntry.java
+++ b/uk/ac/sanger/artemis/io/SimpleDocumentEntry.java
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
- * $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/io/SimpleDocumentEntry.java,v 1.21 2007-09-25 09:59:57 tjc Exp $
+ * $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/io/SimpleDocumentEntry.java,v 1.22 2008-04-01 10:14:42 tjc Exp $
  */
 
 package uk.ac.sanger.artemis.io;
@@ -38,7 +38,7 @@ import javax.swing.JOptionPane;
  *  This class contains the methods common to all DocumentEntry objects.
  *
  *  @author Kim Rutherford <kmr@sanger.ac.uk>
- *  @version $Id: SimpleDocumentEntry.java,v 1.21 2007-09-25 09:59:57 tjc Exp $
+ *  @version $Id: SimpleDocumentEntry.java,v 1.22 2008-04-01 10:14:42 tjc Exp $
  **/
 
 abstract public class SimpleDocumentEntry
@@ -340,8 +340,13 @@ abstract public class SimpleDocumentEntry
       {
         if(force) 
         {
-          if(forcedAdd((SimpleDocumentFeature)makeNativeFeature(new_feature, true)) == null)
-            failed.append(new_feature.getKey().getKeyString()+"\n"); 
+          Feature f = (SimpleDocumentFeature)makeNativeFeature(new_feature, true);
+          
+          if(f != null)
+          {
+            if(forcedAdd(f) == null)
+              failed.append(new_feature.getKey().getKeyString()+"\n");
+          }
         }
         else
         {
-- 
GitLab