Skip to content

Commit

Permalink
Refactor long line in DataStorage.java
Browse files Browse the repository at this point in the history
  • Loading branch information
ShyamKrishna33 committed Mar 28, 2024
1 parent 8b3a57e commit 836b814
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/budgetbuddy/storage/DataStorage.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ private static void writeToFile(String stringToWrite) throws IOException {
private static String getStringToWrite(Transaction t) {
LocalDate date = t.getDate();
String stringDate = date.format(DateTimeFormatter.ofPattern("dd-MM-yyyy"));
return t.getDescription() + " ," + t.getCategory().getCategoryNum() + " ," + t.getTransactionType() + " ," + stringDate
+ " ," + t.getAmount() + "\n";
return t.getDescription() + " ," + t.getCategory().getCategoryNum() + " ,"
+ t.getTransactionType() + " ," + stringDate + " ," + t.getAmount() + "\n";
}

private Transaction processData(String s, Account account) {
Expand Down

0 comments on commit 836b814

Please sign in to comment.