Code cleanup

This commit is contained in:
Ilkka Seppälä
2020-07-30 17:25:32 +03:00
parent 5381387026
commit 981985531d
243 changed files with 1157 additions and 1166 deletions

View File

@@ -112,7 +112,7 @@ public interface CustomerDao {
public class InMemoryCustomerDao implements CustomerDao {
private Map<Integer, Customer> idToCustomer = new HashMap<>();
private final Map<Integer, Customer> idToCustomer = new HashMap<>();
@Override
public Stream<Customer> getAll() {

View File

@@ -44,7 +44,7 @@ import org.slf4j.LoggerFactory;
*/
public class App {
private static final String DB_URL = "jdbc:h2:~/dao";
private static Logger log = LoggerFactory.getLogger(App.class);
private static final Logger log = LoggerFactory.getLogger(App.class);
private static final String ALL_CUSTOMERS = "customerDao.getAllCustomers(): ";
/**

View File

@@ -36,7 +36,7 @@ import java.util.stream.Stream;
*/
public class InMemoryCustomerDao implements CustomerDao {
private Map<Integer, Customer> idToCustomer = new HashMap<>();
private final Map<Integer, Customer> idToCustomer = new HashMap<>();
/**
* An eagerly evaluated stream of customers stored in memory.

View File

@@ -50,7 +50,7 @@ public class DbCustomerDaoTest {
private static final String DB_URL = "jdbc:h2:~/dao";
private DbCustomerDao dao;
private Customer existingCustomer = new Customer(1, "Freddy", "Krueger");
private final Customer existingCustomer = new Customer(1, "Freddy", "Krueger");
/**
* Creates customers schema.