Improve matcher to find event
This commit is contained in:
@@ -59,8 +59,8 @@ public class TippligaGoogleEventManager {
|
||||
|
||||
public static Event findEvent(List<Event> allEvents, Integer season, Integer league, Integer matchday, Integer deliveryDateNumber) {
|
||||
String description = getDescription(season, league, matchday, deliveryDateNumber);
|
||||
for (Event allEvent : allEvents) {
|
||||
if (allEvent.getDescription().equals(description)) return allEvent;
|
||||
for (Event event : allEvents) {
|
||||
if (event.getDescription().replaceAll("\\s+","").equals(description.replaceAll("\\s+",""))) return event;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user