From e7eb82ceb63160569fc10b0caaf25eb3adbc23ba Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Sat, 17 Dec 2016 13:17:39 -0600 Subject: [PATCH] Update dependencies and code to play nice. --- build.gradle | 13 ++++++------- .../com/jdbernard/nlsongs/model/Service.groovy | 6 +++++- .../jdbernard/nlsongs/rest/SongsResourceTest.groovy | 1 - 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index bb609dd..3b45361 100644 --- a/build.gradle +++ b/build.gradle @@ -18,22 +18,21 @@ repositories { mavenCentral() } dependencies { - compile 'ch.qos.logback:logback-classic:1.1.2' - compile 'ch.qos.logback:logback-core:1.1.2' - compile 'com.impossibl.pgjdbc-ng:pgjdbc-ng:0.3' + compile 'ch.qos.logback:logback-classic:1.1.8' + compile 'ch.qos.logback:logback-core:1.1.8' + compile 'com.impossibl.pgjdbc-ng:pgjdbc-ng:0.6' compile 'com.lambdaworks:scrypt:1.4.0' - compile 'com.zaxxer:HikariCP-java6:2.3.2' + compile 'com.zaxxer:HikariCP:2.5.1' compile 'javax:javaee-api:7.0' compile 'javax.ws.rs:javax.ws.rs-api:2.0.1' compile 'joda-time:joda-time:2.7' - compile 'org.codehaus.groovy:groovy-all:2.3.6' - compile 'org.slf4j:slf4j-api:1.7.10' + compile 'org.codehaus.groovy:groovy-all:2.4.7' + compile 'org.slf4j:slf4j-api:1.7.22' runtime 'com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.3.2' runtime 'org.glassfish.jersey.containers:jersey-container-servlet:2.16' runtime 'org.glassfish.jersey.media:jersey-media-json-jackson:2.16' providedCompile 'javax.servlet:javax.servlet-api:3.1.0' - testCompile 'com.jdbernard:jdb-util:3.4' testCompile 'junit:junit:4.12' testRuntime 'com.h2database:h2:1.4.186' diff --git a/src/main/groovy/com/jdbernard/nlsongs/model/Service.groovy b/src/main/groovy/com/jdbernard/nlsongs/model/Service.groovy index 849e6c9..330db74 100644 --- a/src/main/groovy/com/jdbernard/nlsongs/model/Service.groovy +++ b/src/main/groovy/com/jdbernard/nlsongs/model/Service.groovy @@ -16,7 +16,7 @@ public class Service implements Serializable { Service that = (Service) thatObj return (this.id == that.id && - this.date == (that.@date) && + this.date == (that.rawDate) && this.serviceType == that.serviceType) } public void setDate(Date date) { this.date = LocalDate.fromDateFields(date) } @@ -26,4 +26,8 @@ public class Service implements Serializable { public Date getDate() { return this.date.toDate() } public String toString() { return "$id: $date - $serviceType" } + + // Needed only because the @directFieldAccesor syntax stopped working in + // Groovy 2.4.7 + private LocalDate getRawDate() { return this.date } } diff --git a/src/test/groovy/com/jdbernard/nlsongs/rest/SongsResourceTest.groovy b/src/test/groovy/com/jdbernard/nlsongs/rest/SongsResourceTest.groovy index 8763722..6182035 100644 --- a/src/test/groovy/com/jdbernard/nlsongs/rest/SongsResourceTest.groovy +++ b/src/test/groovy/com/jdbernard/nlsongs/rest/SongsResourceTest.groovy @@ -1,6 +1,5 @@ package com.jdbernard.nlsongs.rest -import com.jdbernard.net.HttpContext import org.junit.Test import org.junit.AfterClass import org.junit.BeforeClass