Fixes based on code review feedback

This commit is contained in:
Evan Sia Wai Suan
2018-05-12 17:47:03 +01:00
parent abcc39871b
commit 29edeabaae
7 changed files with 60 additions and 47 deletions

View File

@@ -15,23 +15,11 @@ import java.util.List;
*/
public class DataFetcher {
private static DataFetcher df;
private final String filename = "world.txt";
private long lastFetched = -1;
private long lastFetched;
private DataFetcher() {
}
/**
* Init.
*
* @return DataFetcher instance
*/
public static DataFetcher getInstance() {
if (df == null) {
df = new DataFetcher();
}
return df;
public DataFetcher() {
this.lastFetched = -1;
}
private boolean isDirty(long fileLastModified) {
@@ -66,6 +54,6 @@ public class DataFetcher {
return data;
}
return null;
return new ArrayList<String>();
}
}