From 5f03e80712f7a18370b5118fde5327bde1b6fbbf Mon Sep 17 00:00:00 2001 From: sowgro Date: Tue, 25 Mar 2025 10:17:55 -0400 Subject: Fix tests and more cleanup --- .../java/com/ufund/api/ufundapi/persistence/CupboardFileDAO.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/CupboardFileDAO.java') diff --git a/ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/CupboardFileDAO.java b/ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/CupboardFileDAO.java index 3115204..7efda83 100644 --- a/ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/CupboardFileDAO.java +++ b/ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/CupboardFileDAO.java @@ -55,14 +55,12 @@ public class CupboardFileDAO implements CupboardDAO { /** * Saves the needs to json * - * @return True if the save was successful, false otherwise * @throws IOException If there was an IO issue saving the file */ - private boolean save() throws IOException { + private void save() throws IOException { Need[] needArray = needs.values().toArray(Need[]::new); objectMapper.writeValue(new File(filename), needArray); - return true; } @Override @@ -109,7 +107,8 @@ public class CupboardFileDAO implements CupboardDAO { synchronized (needs) { if (needs.containsKey(id)) { needs.remove(id); - return save(); + save(); + return true; } else { return false; } -- cgit v1.2.3