aboutsummaryrefslogtreecommitdiff
path: root/ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/CupboardFileDAO.java
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2025-03-25 10:17:55 -0400
committersowgro <tpoke.ferrari@gmail.com>2025-03-25 10:17:55 -0400
commit5f03e80712f7a18370b5118fde5327bde1b6fbbf (patch)
tree17ff94c8ba74ab2bfe6195cb6dc6ca06e71f2ea3 /ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/CupboardFileDAO.java
parent9aa8a8e80caaad9196752e2e101525a584f35a08 (diff)
downloadJellySolutions-5f03e80712f7a18370b5118fde5327bde1b6fbbf.tar.gz
JellySolutions-5f03e80712f7a18370b5118fde5327bde1b6fbbf.tar.bz2
JellySolutions-5f03e80712f7a18370b5118fde5327bde1b6fbbf.zip
Fix tests and more cleanup
Diffstat (limited to 'ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/CupboardFileDAO.java')
-rw-r--r--ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/CupboardFileDAO.java7
1 files changed, 3 insertions, 4 deletions
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;
}