|
17 | 17 | package com.google.cloud.bigquery; |
18 | 18 |
|
19 | 19 | import static com.google.common.truth.Truth.assertThat; |
20 | | -import static org.threeten.bp.temporal.ChronoField.HOUR_OF_DAY; |
21 | | -import static org.threeten.bp.temporal.ChronoField.MINUTE_OF_HOUR; |
22 | | -import static org.threeten.bp.temporal.ChronoField.NANO_OF_SECOND; |
23 | | -import static org.threeten.bp.temporal.ChronoField.SECOND_OF_MINUTE; |
| 20 | +import static java.time.temporal.ChronoField.HOUR_OF_DAY; |
| 21 | +import static java.time.temporal.ChronoField.MINUTE_OF_HOUR; |
| 22 | +import static java.time.temporal.ChronoField.NANO_OF_SECOND; |
| 23 | +import static java.time.temporal.ChronoField.SECOND_OF_MINUTE; |
24 | 24 |
|
25 | 25 | import com.google.api.services.bigquery.model.QueryParameterType; |
26 | 26 | import com.google.common.collect.ImmutableMap; |
27 | 27 | import com.google.gson.JsonObject; |
28 | 28 | import java.math.BigDecimal; |
29 | 29 | import java.text.ParseException; |
| 30 | +import java.time.Instant; |
30 | 31 | import java.time.Period; |
| 32 | +import java.time.ZoneOffset; |
| 33 | +import java.time.format.DateTimeFormatter; |
| 34 | +import java.time.format.DateTimeFormatterBuilder; |
31 | 35 | import java.util.ArrayList; |
32 | 36 | import java.util.Date; |
33 | 37 | import java.util.HashMap; |
34 | 38 | import java.util.List; |
35 | 39 | import java.util.Map; |
36 | 40 | import org.junit.Assert; |
37 | 41 | import org.junit.Test; |
38 | | -import org.threeten.bp.Instant; |
39 | | -import org.threeten.bp.ZoneOffset; |
40 | | -import org.threeten.bp.format.DateTimeFormatter; |
41 | | -import org.threeten.bp.format.DateTimeFormatterBuilder; |
42 | | -import org.threeten.bp.jdk8.Jdk8Methods; |
43 | 42 | import org.threeten.extra.PeriodDuration; |
44 | 43 |
|
45 | 44 | public class QueryParameterValueTest { |
@@ -338,8 +337,8 @@ public void testTimestampFromLong() { |
338 | 337 | public void testTimestampWithFormatter() { |
339 | 338 | long timestampInMicroseconds = 1571068536842L * 1000 + 123; |
340 | 339 | long microseconds = 1_000_000; |
341 | | - long secs = Jdk8Methods.floorDiv(timestampInMicroseconds, microseconds); |
342 | | - int nano = (int) Jdk8Methods.floorMod(timestampInMicroseconds, microseconds) * 1000; |
| 340 | + long secs = Math.floorDiv(timestampInMicroseconds, microseconds); |
| 341 | + int nano = (int) Math.floorMod(timestampInMicroseconds, microseconds) * 1000; |
343 | 342 | Instant instant = Instant.ofEpochSecond(secs, nano); |
344 | 343 | String expected = TIMESTAMPFORMATTER.format(instant); |
345 | 344 | assertThat(expected) |
|
0 commit comments