📍Use lombok, reformat, and optimize the code (#1560)

* Use lombok, reformat, and optimize the code

* Fix merge conflicts and some sonar issues

Co-authored-by: va1m <va1m@email.com>
This commit is contained in:
va1m
2021-03-13 13:19:21 +01:00
committed by GitHub
parent 0e26a6adb5
commit 5cf2fe009b
681 changed files with 2472 additions and 4966 deletions

View File

@ -25,8 +25,7 @@ package com.iluwatar.dirtyflag;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import lombok.extern.slf4j.Slf4j;
/**
* This application demonstrates the <b>Dirty Flag</b> pattern. The dirty flag behavioral pattern
@ -51,10 +50,9 @@ import org.slf4j.LoggerFactory;
* re-fetches from <i>world.txt</i> when needed. {@link World} mainly serves the data to the
* front-end.
*/
@Slf4j
public class App {
private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
/**
* Program execution point.
*/

View File

@ -29,18 +29,16 @@ import java.io.FileReader;
import java.io.IOException;
import java.util.List;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import lombok.extern.slf4j.Slf4j;
/**
* A mock database manager -- Fetches data from a raw file.
*
* @author swaisuan
*/
@Slf4j
public class DataFetcher {
private static final Logger LOGGER = LoggerFactory.getLogger(DataFetcher.class);
private final String filename = "world.txt";
private long lastFetched;

View File

@ -37,7 +37,7 @@ public class World {
private final DataFetcher df;
public World() {
this.countries = new ArrayList<String>();
this.countries = new ArrayList<>();
this.df = new DataFetcher();
}