clean up.

This commit is contained in:
2025-09-06 20:22:27 -04:00
parent a3bd96e749
commit 65b126a702
11 changed files with 45 additions and 50 deletions

View File

@@ -3,7 +3,6 @@ package lodge.reservationsystem;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.lang.reflect.Type;
import java.nio.charset.StandardCharsets;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
@@ -13,7 +12,6 @@ import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
import java.time.ZonedDateTime;
import com.google.gson.stream.JsonReader;
final class DataRepository {
@@ -65,15 +63,7 @@ final class DataRepository {
}
});
}
public static Account LoadAccount(Path file) throws IOException {
Account ac = null;
try (BufferedReader in = new BufferedReader(new FileReader(file.toFile(), StandardCharsets.UTF_8))) {
JsonReader jsonReader = new JsonReader(in);
/**
* @param file
* @throws IOException
*/
public final static Account LoadAccount(final Path file) throws IOException {
/** @TODO finish loading Account */
try (BufferedReader in = new BufferedReader(new FileReader(file.toFile(), StandardCharsets.UTF_8));
@@ -133,7 +123,6 @@ final class DataRepository {
jsonReader.close();
return ac.account_number.length() > 8 ? ac : null;
}
return ac;
}
static void loadReservationRefList(JsonReader rdr, Account ac) throws IOException {