updates cleanup.
This commit is contained in:
@@ -121,7 +121,7 @@ final class DataRepository {
|
||||
}
|
||||
}
|
||||
jsonReader.close();
|
||||
return ac.account_number.length() > 8 ? ac : null;
|
||||
return ac.getAccount_number().length() > 8 ? ac : null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,14 +133,14 @@ final class DataRepository {
|
||||
rdr.beginObject();
|
||||
rdr.nextName();
|
||||
String reservationNumber = rdr.nextString();
|
||||
loadReservation(ac.reservation_list, reservationType, reservationNumber);
|
||||
loadReservation(ac, reservationType, reservationNumber);
|
||||
rdr.endObject();
|
||||
rdr.endObject();
|
||||
}
|
||||
rdr.endArray();
|
||||
}
|
||||
|
||||
private static void loadReservation(AccountReservationList reservation_list, String reservationType,
|
||||
private static void loadReservation(Account ac, String reservationType,
|
||||
String reservationNumber) throws IOException {
|
||||
String filename = String.format("rsv-%s.json", reservationNumber);
|
||||
Path basePath = Paths.get(getPath());
|
||||
@@ -242,9 +242,8 @@ final class DataRepository {
|
||||
}
|
||||
}
|
||||
|
||||
if (rsrv.checkValid()) {
|
||||
reservation_list.add(rsrv);
|
||||
}
|
||||
ac.add(rsrv);
|
||||
|
||||
} catch (Exception e) {
|
||||
System.out.println(e.toString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user