From 6ebdf92f83cec53fb68f710bfe5138ae4f1d04b6 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 2 Sep 2017 09:38:26 +1200 Subject: Update Java libraries --- pom.xml | 18 +++++++++--------- src/org/traccar/model/Calendar.java | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index f04a3ff68..0a8de00b2 100644 --- a/pom.xml +++ b/pom.xml @@ -40,17 +40,17 @@ mysql mysql-connector-java - 5.1.42 + 5.1.44 org.postgresql postgresql - 42.1.1.jre7 + 42.1.4.jre7 com.microsoft.sqlserver mssql-jdbc - 6.2.0.jre7 + 6.2.1.jre7 com.microsoft.azure @@ -136,12 +136,12 @@ org.jxls jxls - 2.4.0 + 2.4.2 org.jxls jxls-poi - 1.0.12 + 1.0.13 org.apache.velocity @@ -156,7 +156,7 @@ org.mnode.ical4j ical4j - 2.0.0 + 2.0.4 com.fizzed @@ -229,7 +229,7 @@ maven-compiler-plugin - 3.6.1 + 3.6.2 1.7 1.7 @@ -238,7 +238,7 @@ maven-assembly-plugin - 3.0.0 + 3.1.0 jar-with-dependencies @@ -308,7 +308,7 @@ org.codehaus.mojo findbugs-maven-plugin - 3.0.4 + 3.0.5 maven-pmd-plugin 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 periodRule = new PeriodRule<>(period); - Filter filter = new Filter<>(new Rule[] {periodRule}, Filter.MATCH_ANY); + Predicate periodRule = new PeriodRule<>(period); + Filter filter = new Filter<>(new Predicate[] {periodRule}, Filter.MATCH_ANY); Collection events = filter.filter(calendar.getComponents(CalendarComponent.VEVENT)); if (events != null && !events.isEmpty()) { return true; -- cgit v1.2.3