From 7ec3bb005b1dd1621d386b05087ebab33fc47d0f Mon Sep 17 00:00:00 2001 From: gmungoc Date: Fri, 15 May 2020 17:48:57 +0100 Subject: [PATCH] JAL-3619 default silently to Jmol if viewerType absent (Jalview < 2.9) --- src/jalview/project/Jalview2XML.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/jalview/project/Jalview2XML.java b/src/jalview/project/Jalview2XML.java index b6295d9..b408c07 100644 --- a/src/jalview/project/Jalview2XML.java +++ b/src/jalview/project/Jalview2XML.java @@ -4403,9 +4403,14 @@ public class Jalview2XML * From 2.9: stateData.type contains JMOL or CHIMERA, data is in jar entry * "viewer_"+stateData.viewId */ - ViewerType viewerType = ViewerType.valueOf(stateData.getType()); + String type = stateData.getType(); + if (type == null) + { + type = ViewerType.JMOL.toString(); + } try { + ViewerType viewerType = ViewerType.valueOf(type); switch (viewerType) { case CHIMERA: @@ -4423,7 +4428,7 @@ public class Jalview2XML } catch (IllegalArgumentException | NullPointerException e) { Cache.log.error( - "Invalid structure viewer type: " + stateData.getType()); + "Invalid structure viewer type: " + type); } } -- 1.7.10.2