Refactor Line separator for Mac and add APIFootballProvider

This commit is contained in:
Julian Arndt
2020-09-29 17:43:05 +02:00
parent a484010285
commit 9c88c28151
10 changed files with 161 additions and 138 deletions

View File

@@ -12,6 +12,7 @@ import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
@@ -77,7 +78,7 @@ public class APIFootballConnector {
JSONObject object = null;
//JSON parser object to parse read file
JSONParser jsonParser = new JSONParser();
URL url = Resources.getResource((this.season + 1) + "\\API-Football\\" + filename + ".json");
URL url = Resources.getResource((this.season + 1) + File.separator + "API-Football" + File.separator + filename + ".json");
String jsonConfig = null;
try {