From eb7a26d5a2a6168aabe6a35d434aa6546159e977 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 20 Oct 2022 21:00:49 +0100 Subject: [PATCH] JAL-2349 formatting/pick correct exception --- src/jalview/datamodel/ContactMatrix.java | 5 +---- test/jalview/datamodel/ContactMatrixTest.java | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) 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) -- 1.7.10.2