support both jdk 8 and 9
This commit is contained in:
parent
5421a23fba
commit
d1ed842f02
@ -2,6 +2,8 @@ language: java
|
||||
jdk:
|
||||
- oraclejdk8
|
||||
- openjdk8
|
||||
- oraclejdk9
|
||||
- openjdk9
|
||||
|
||||
addons:
|
||||
mariadb: '10.0'
|
||||
|
@ -475,6 +475,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>
|
||||
|
@ -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() {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user