From: Mateusz Warowny Date: Tue, 15 Feb 2022 16:27:57 +0000 (+0100) Subject: JAL-3954 Make database parameter optional using default value if not provided. X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=55b313fa4afcd5daed336266ee15af107d2eb42e;p=jalview.git JAL-3954 Make database parameter optional using default value if not provided. --- diff --git a/src/jalview/hmmer/rest/PhmmerRequestBuilder.java b/src/jalview/hmmer/rest/PhmmerRequestBuilder.java index 60f5546..8026eb5 100644 --- a/src/jalview/hmmer/rest/PhmmerRequestBuilder.java +++ b/src/jalview/hmmer/rest/PhmmerRequestBuilder.java @@ -281,8 +281,6 @@ public class PhmmerRequestBuilder { public PhmmerRequest build() { if (sequence == null) throw new IllegalStateException("sequence not set"); - if (database == null) - throw new IllegalStateException("database not set"); boolean usingEValues = incE != null || incdomE != null || E != null || domE != null; boolean usingBitScores = incT != null || incdomT != null || T != null || domT != null; if (usingEValues && usingBitScores) @@ -302,7 +300,7 @@ public class PhmmerRequestBuilder { requireNonNullElse(noBias, defaultNoBias), requireNonNullElse(compressedOut, defaultCompressedOut), requireNonNullElse(alignView, defaultAlignView), - database, + requireNonNullElse(database, defaultDatabase), requireNonNullElse(evalue, defaultEvalue), sequence, requireNonNullElse(nhits, defaultNhits));