From: kiramt Date: Thu, 8 Jun 2017 14:01:02 +0000 (+0100) Subject: JAL-2586 Clarification to URL link code X-Git-Tag: Release_2_10_2~3^2~22^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fbug%2FJAL-2586;p=jalview.git JAL-2586 Clarification to URL link code --- diff --git a/src/jalview/urls/UrlLinkDisplay.java b/src/jalview/urls/UrlLinkDisplay.java index 5b376a2..09566c3 100644 --- a/src/jalview/urls/UrlLinkDisplay.java +++ b/src/jalview/urls/UrlLinkDisplay.java @@ -177,7 +177,7 @@ public class UrlLinkDisplay break; case NAME: setDescription((String) value); - break; + // deliberate fall through case DATABASE: setDBName((String) value); break; diff --git a/test/jalview/urls/UrlLinkDisplayTest.java b/test/jalview/urls/UrlLinkDisplayTest.java index ff7d957..9eeac9f 100644 --- a/test/jalview/urls/UrlLinkDisplayTest.java +++ b/test/jalview/urls/UrlLinkDisplayTest.java @@ -131,7 +131,7 @@ public class UrlLinkDisplayTest { u.setValue(UrlLinkDisplay.NAME, "New Desc"); Assert.assertEquals(u.getValue(UrlLinkDisplay.NAME), "New Desc"); - Assert.assertEquals(u.getValue(UrlLinkDisplay.DATABASE), "TestDB"); + Assert.assertEquals(u.getValue(UrlLinkDisplay.DATABASE), "New Desc"); u.setValue(UrlLinkDisplay.DATABASE, "NewName"); Assert.assertEquals(u.getValue(UrlLinkDisplay.DATABASE), "NewName");