diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2025-03-25 00:03:45 -0400 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2025-03-25 00:03:45 -0400 |
commit | c15aa3daab0cf9a640945d4e634d1327fb55d2db (patch) | |
tree | 33b4331ce63890104dff5aa97152ac3f87386492 /ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/CupboardFileDAO.java | |
parent | a8175ba69669fddadfbe143e11972cc21821ed5f (diff) | |
download | JellySolutions-c15aa3daab0cf9a640945d4e634d1327fb55d2db.tar.gz JellySolutions-c15aa3daab0cf9a640945d4e634d1327fb55d2db.tar.bz2 JellySolutions-c15aa3daab0cf9a640945d4e634d1327fb55d2db.zip |
Greatly improve logging and other backend clean up
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.java | 13 |
1 files changed, 2 insertions, 11 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 4d11554..3115204 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 @@ -53,22 +53,13 @@ public class CupboardFileDAO implements CupboardDAO { } /** - * Return an array of the needs - * - * @return An array of all the needs - */ - private Need[] getNeedsArray() { - return needs.values().toArray(Need[]::new); - } - - /** * 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 { - Need[] needArray = getNeedsArray(); + Need[] needArray = needs.values().toArray(Need[]::new); objectMapper.writeValue(new File(filename), needArray); return true; @@ -77,7 +68,7 @@ public class CupboardFileDAO implements CupboardDAO { @Override public Need[] getNeeds() { synchronized (needs) { - return getNeedsArray(); + return needs.values().toArray(Need[]::new); } } |