aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pom.xml18
-rw-r--r--src/org/traccar/model/Calendar.java6
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 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
- <version>5.1.42</version> <!-- Version 6 required Java 8 -->
+ <version>5.1.44</version> <!-- Version 6 required Java 8 -->
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
- <version>42.1.1.jre7</version>
+ <version>42.1.4.jre7</version>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
- <version>6.2.0.jre7</version>
+ <version>6.2.1.jre7</version>
<exclusions>
<exclusion>
<groupId>com.microsoft.azure</groupId>
@@ -136,12 +136,12 @@
<dependency>
<groupId>org.jxls</groupId>
<artifactId>jxls</artifactId>
- <version>2.4.0</version>
+ <version>2.4.2</version>
</dependency>
<dependency>
<groupId>org.jxls</groupId>
<artifactId>jxls-poi</artifactId>
- <version>1.0.12</version>
+ <version>1.0.13</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
@@ -156,7 +156,7 @@
<dependency>
<groupId>org.mnode.ical4j</groupId>
<artifactId>ical4j</artifactId>
- <version>2.0.0</version>
+ <version>2.0.4</version>
</dependency>
<dependency>
<groupId>com.fizzed</groupId>
@@ -229,7 +229,7 @@
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.6.1</version>
+ <version>3.6.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
@@ -238,7 +238,7 @@
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
- <version>3.0.0</version>
+ <version>3.1.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
@@ -308,7 +308,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
- <version>3.0.4</version>
+ <version>3.0.5</version>
</plugin>
<plugin>
<artifactId>maven-pmd-plugin</artifactId>
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;