From: gmungoc Date: Fri, 15 May 2020 16:48:57 +0000 (+0100) Subject: JAL-3619 default silently to Jmol if viewerType absent (Jalview < 2.9) X-Git-Tag: Release_2_11_2_0~37^2~15 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=7ec3bb005b1dd1621d386b05087ebab33fc47d0f;p=jalview.git JAL-3619 default silently to Jmol if viewerType absent (Jalview < 2.9) --- 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); } }