librejack

Blackjack clone written in java
git clone https://github.com/michaelneuper/librejack.git
README | Files | Log | Refs | LICENSE

commit c7792a15adbbc8cf513213659ea4ed8f11da55d1
parent f843d3345621ba02c4dd901f63d7c420b1ffff65
Author: Michael Neuper <michael@michaelneuper.com>
Date:   Sun, 14 May 2023 13:07:26 +0200

Format

Diffstat:
Msrc/model/Statistics.java | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/model/Statistics.java b/src/model/Statistics.java @@ -178,14 +178,16 @@ public class Statistics { * @return a {@link Statistics} object with the values read from the * {@code CSV_FILE} file, or an empty {@link Statistics} object if there was * a problem with the CSV file format - * @throws IOException if there is a problem with the file reading - * process or the CSV file headers are invalid + * @throws IOException if there is a problem with the file reading process + * or the CSV file headers are invalid */ public static Statistics load() throws IOException { Statistics stats = new Statistics(); try (CSVReader reader = new CSVReader(new FileReader(CSV_FILE))) { String[] headers = reader.readNext(); - if (!headers[0].equals(CSV_HEADERS[0]) || !headers[1].equals(CSV_HEADERS[1]) || !headers[2].equals(CSV_HEADERS[2])) { + if (!headers[0].equals(CSV_HEADERS[0]) + || !headers[1].equals(CSV_HEADERS[1]) + || !headers[2].equals(CSV_HEADERS[2])) { throw new IOException("Invalid CSV headers"); } String[] data = reader.readNext();