A funny one.
...
private static final String ALL_CUSTOMERS = "customerDao.getAllCustomers(): ";
...
customerDao.add(customer);
- log.info(ALL_CUSTOMERS + customerDao.getAll());
+ log.info();
...
/**
* Get all customers.
*
* @return all the customers as a stream. The stream may be lazily or eagerly evaluated based on
* the implementation. The stream must be closed after use.
* @throws Exception if any error occurs.
*/
Stream<Customer> getAll() throws Exception;
...
Note that source code is using Java 11 it that matters.
A funny one.
App.java:
With CustomerDao:
Full source code:
https://github.com/iluwatar/java-design-patterns/tree/master/dao/src/main/java/com/iluwatar/dao
Note that source code is using Java 11 it that matters.