From 55b313fa4afcd5daed336266ee15af107d2eb42e Mon Sep 17 00:00:00 2001 From: Mateusz Warowny Date: Tue, 15 Feb 2022 17:27:57 +0100 Subject: [PATCH] JAL-3954 Make database parameter optional using default value if not provided. --- src/jalview/hmmer/rest/PhmmerRequestBuilder.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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)); -- 1.7.10.2