From: Jim Procter Date: Thu, 20 Oct 2022 20:00:49 +0000 (+0100) Subject: JAL-2349 formatting/pick correct exception X-Git-Tag: Release_2_11_4_0~526 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=eb7a26d5a2a6168aabe6a35d434aa6546159e977;p=jalview.git JAL-2349 formatting/pick correct exception --- diff --git a/src/jalview/datamodel/ContactMatrix.java b/src/jalview/datamodel/ContactMatrix.java index 2968ab9..de7cba4 100644 --- a/src/jalview/datamodel/ContactMatrix.java +++ b/src/jalview/datamodel/ContactMatrix.java @@ -1,7 +1,5 @@ package jalview.datamodel; -import jalview.ws.params.InvalidArgumentException; - import java.util.ArrayList; import java.util.List; @@ -27,7 +25,7 @@ public class ContactMatrix implements ContactMatrixI { if (left < 0 || right < 0) { - throw new Error(new InvalidArgumentException( + throw new Error(new RuntimeException( "Cannot have negative indices for contact left=" + left + " right=" + right + " strength=" + strength)); } @@ -73,7 +71,6 @@ public class ContactMatrix implements ContactMatrixI } } - @Override public ContactListI getContactList(final int column) { diff --git a/test/jalview/datamodel/ContactMatrixTest.java b/test/jalview/datamodel/ContactMatrixTest.java index 5d8b8d1..43be888 100644 --- a/test/jalview/datamodel/ContactMatrixTest.java +++ b/test/jalview/datamodel/ContactMatrixTest.java @@ -1,11 +1,11 @@ package jalview.datamodel; -import jalview.gui.JvOptionPane; - import org.testng.Assert; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; +import jalview.gui.JvOptionPane; + public class ContactMatrixTest { @BeforeClass(alwaysRun = true)