aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-09-02 09:38:26 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-09-02 09:38:26 +1200
commit6ebdf92f83cec53fb68f710bfe5138ae4f1d04b6 (patch)
tree245bdfe7623b372cb7ed9e2cf5b8fd4d5851b3c9 /src/org/traccar/model
parentebd2dcda811a8604d889824f02a79c727c5f1674 (diff)
downloadtraccar-server-6ebdf92f83cec53fb68f710bfe5138ae4f1d04b6.tar.gz
traccar-server-6ebdf92f83cec53fb68f710bfe5138ae4f1d04b6.tar.bz2
traccar-server-6ebdf92f83cec53fb68f710bfe5138ae4f1d04b6.zip
Update Java libraries
Diffstat (limited to 'src/org/traccar/model')
-rw-r--r--src/org/traccar/model/Calendar.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/model/Calendar.java b/src/org/traccar/model/Calendar.java
index 3d855b1be..56d3eb74c 100644
--- a/src/org/traccar/model/Calendar.java
+++ b/src/org/traccar/model/Calendar.java
@@ -27,11 +27,11 @@ import net.fortuna.ical4j.data.CalendarBuilder;
import net.fortuna.ical4j.data.ParserException;
import net.fortuna.ical4j.filter.Filter;
import net.fortuna.ical4j.filter.PeriodRule;
-import net.fortuna.ical4j.filter.Rule;
import net.fortuna.ical4j.model.DateTime;
import net.fortuna.ical4j.model.Dur;
import net.fortuna.ical4j.model.Period;
import net.fortuna.ical4j.model.component.CalendarComponent;
+import org.apache.commons.collections4.Predicate;
import org.traccar.database.QueryIgnore;
public class Calendar extends ExtendedModel {
@@ -69,8 +69,8 @@ public class Calendar extends ExtendedModel {
public boolean checkMoment(Date date) {
if (calendar != null) {
Period period = new Period(new DateTime(date), new Dur(0, 0, 0, 0));
- Rule<CalendarComponent> periodRule = new PeriodRule<>(period);
- Filter<CalendarComponent> filter = new Filter<>(new Rule[] {periodRule}, Filter.MATCH_ANY);
+ Predicate<CalendarComponent> periodRule = new PeriodRule<>(period);
+ Filter<CalendarComponent> filter = new Filter<>(new Predicate[] {periodRule}, Filter.MATCH_ANY);
Collection<CalendarComponent> events = filter.filter(calendar.getComponents(CalendarComponent.VEVENT));
if (events != null && !events.isEmpty()) {
return true;