Merge pull request #1898 from OpenRefine/issue/1890

support both jdk 8, oracle jdk9 and openjdk11
This commit is contained in:
Antonin Delpeuch 2018-12-09 22:47:20 +09:00 committed by GitHub
commit dd0fa967d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 15 additions and 33 deletions

View File

@ -2,6 +2,8 @@ language: java
jdk:
- oraclejdk8
- openjdk8
- oraclejdk9
- openjdk11
addons:
mariadb: '10.0'

View File

@ -177,7 +177,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.8.9</version>
<version>2.23.4</version>
<scope>test</scope>
</dependency>

View File

@ -202,7 +202,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.8.9</version>
<version>2.23.4</version>
<scope>test</scope>
</dependency>

View File

@ -61,10 +61,9 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<!--release>11</release-->
<encoding>UTF-8</encoding>
<showDeprecation>false</showDeprecation>
</configuration>
@ -454,7 +453,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.8.9</version>
<version>2.23.4</version>
<scope>test</scope>
</dependency>
<dependency>
@ -475,6 +474,11 @@
<version>1.7.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
</dependencies>
</project>

View File

@ -2,7 +2,6 @@ package com.google.refine.tests.expr.functions.date;
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeFormatterBuilder;
import java.util.Calendar;
import java.util.Date;
import java.util.Properties;
@ -58,12 +57,7 @@ public class DatePartTests extends RefineTest {
}
}
private DateTimeFormatter formatter = new DateTimeFormatterBuilder()
.append(DateTimeFormatter.BASIC_ISO_DATE).appendLiteral('-')
.appendPattern("HH:mm:ss")
.appendPattern("[.SSSSSSSSS][.SSSSSS][.SSS]") // optional nanos, with 9, 6 or 3 digits
.appendOffset("+HH:mm", "Z")
.toFormatter();
private DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd-HH:mm:ss.SSSSSSSSSX");
@Test
public void testOffsetDateTimeDatePart() {

View File

@ -2,7 +2,6 @@ package com.google.refine.tests.expr.functions.date;
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeFormatterBuilder;
import java.time.temporal.ChronoUnit;
import java.util.Properties;
@ -23,12 +22,7 @@ import com.google.refine.tests.util.TestUtils;
public class IncTests extends RefineTest {
private static Properties bindings;
private DateTimeFormatter formatter = new DateTimeFormatterBuilder()
.append(DateTimeFormatter.BASIC_ISO_DATE).appendLiteral('-')
.appendPattern("HH:mm:ss")
.appendPattern("[.SSSSSSSSS][.SSSSSS][.SSS]") // optional nanos, with 9, 6 or 3 digits
.appendOffset("+HH:mm", "Z")
.toFormatter();
private DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd-HH:mm:ss.SSSSSSSSSX");
@Override
@BeforeTest

View File

@ -2,7 +2,6 @@ package com.google.refine.tests.expr.functions.date;
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeFormatterBuilder;
import java.util.Properties;
import org.slf4j.LoggerFactory;
@ -21,12 +20,7 @@ import com.google.refine.tests.util.TestUtils;
public class NowTests extends RefineTest {
private static Properties bindings;
private DateTimeFormatter formatter = new DateTimeFormatterBuilder()
.append(DateTimeFormatter.BASIC_ISO_DATE).appendLiteral('-')
.appendPattern("HH:mm:ss")
.appendPattern("[.SSSSSSSSS][.SSSSSS][.SSS]") // optional nanos, with 9, 6 or 3 digits
.appendOffset("+HH:mm", "Z")
.toFormatter();
private DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd-HH:mm:ss.SSSSSSSSSX");
@Override
@BeforeTest

View File

@ -10,11 +10,5 @@
<name>OpenRefine - dummy packaging</name>
<description>Dummy packaging for travis</description>
<url>http://openrefine.org/</url>
<parent>
<groupId>org.openrefine</groupId>
<artifactId>openrefine</artifactId>
<version>3.1-SNAPSHOT</version>
</parent>
</project>