Fix error
This commit is contained in:
@@ -77,9 +77,11 @@ public class APIFootballMatch extends BaseMatch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void parseResult(JSONObject json) {
|
private void parseResult(JSONObject json) {
|
||||||
String resultFulltime = ((JSONObject) json.get("score")).get("fulltime").toString();
|
Object resultFulltime = ((JSONObject) json.get("score")).get("fulltime");
|
||||||
this.goalsHome = Integer.parseInt(resultFulltime.substring(0, 1));
|
if(resultFulltime != null) {
|
||||||
this.goalsGuest = Integer.parseInt(resultFulltime.substring(2, 3));
|
this.goalsHome = Integer.parseInt(resultFulltime.toString().substring(0, 1));
|
||||||
|
this.goalsGuest = Integer.parseInt(resultFulltime.toString().substring(2, 3));
|
||||||
|
}
|
||||||
|
|
||||||
Object resultExtratime = ((JSONObject) json.get("score")).get("extratime");
|
Object resultExtratime = ((JSONObject) json.get("score")).get("extratime");
|
||||||
if(resultExtratime != null) {
|
if(resultExtratime != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user