From e3a91c662873d6b6e6f86b6b596f578a16e23779 Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Tue, 26 Apr 2016 11:19:52 +0100 Subject: [PATCH] JAL-2071 House keeping --- .classpath | 2 +- src/jalview/fts/core/FTSRestClient.java | 3 +-- test/jalview/fts/core/FTSRestClientTest.java | 4 +--- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.classpath b/.classpath index 37b682b..cad9e2b 100644 --- a/.classpath +++ b/.classpath @@ -39,7 +39,7 @@ - + diff --git a/src/jalview/fts/core/FTSRestClient.java b/src/jalview/fts/core/FTSRestClient.java index 8ac740c..f611d5b 100644 --- a/src/jalview/fts/core/FTSRestClient.java +++ b/src/jalview/fts/core/FTSRestClient.java @@ -399,11 +399,10 @@ public abstract class FTSRestClient implements FTSRestClientI protected String getResourceFile(String fileName) { - ClassLoader classLoader = getClass().getClassLoader(); String result = ""; try { - result = classLoader.getResource(fileName).getFile(); + result = getClass().getResource(fileName).getFile(); } catch (Exception e) { e.printStackTrace(); diff --git a/test/jalview/fts/core/FTSRestClientTest.java b/test/jalview/fts/core/FTSRestClientTest.java index fa36cac..4a90c4e 100644 --- a/test/jalview/fts/core/FTSRestClientTest.java +++ b/test/jalview/fts/core/FTSRestClientTest.java @@ -268,7 +268,7 @@ public class FTSRestClientTest "unavailable group").toString(); } catch (Exception e) { - e.printStackTrace(); + Assert.assertTrue(true); } String actualResourseFile = ftsRestClient @@ -285,7 +285,6 @@ public class FTSRestClientTest ftsRestClient.getDataColumnByNameOrCode("unavailable column"); } catch (Exception e) { - e.printStackTrace(); System.out.println(e.getMessage()); String expectedMessage = "Couldn't find data column with name : unavailable column"; Assert.assertEquals(e.getMessage(), expectedMessage); @@ -295,7 +294,6 @@ public class FTSRestClientTest ftsRestClient.getDataColumnGroupById("unavailable column group Id"); } catch (Exception e) { - e.printStackTrace(); System.out.println(e.getMessage()); String expectedMessage = "Couldn't find data column group with id : unavailable column group Id"; Assert.assertEquals(e.getMessage(), expectedMessage); -- 1.7.10.2