From 42e8590d9fd018a2c848d2464f0925656d54ae16 Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Mon, 27 Feb 2023 09:26:02 +0100 Subject: [PATCH] [jOOQ/jOOQ#14699] PostgreSQL interval parser handle fractional seconds with interval style iso_8601 --- jOOQ/src/main/java/org/jooq/util/postgres/PGInterval.java | 7 +++---- pom.xml | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/jOOQ/src/main/java/org/jooq/util/postgres/PGInterval.java b/jOOQ/src/main/java/org/jooq/util/postgres/PGInterval.java index d6c21b4d86..fdfb9bb42b 100644 --- a/jOOQ/src/main/java/org/jooq/util/postgres/PGInterval.java +++ b/jOOQ/src/main/java/org/jooq/util/postgres/PGInterval.java @@ -95,13 +95,12 @@ public class PGInterval extends PGobject { for (int i = 0; i < timeValue.length(); i++) { int lookAhead = lookAhead(timeValue, i, "HMS"); if (lookAhead > 0) { - number = Integer.parseInt(timeValue.substring(i, lookAhead)); if (timeValue.charAt(lookAhead) == 'H') { - setHours(number); + setHours(Integer.parseInt(timeValue.substring(i, lookAhead))); } else if (timeValue.charAt(lookAhead) == 'M') { - setMinutes(number); + setMinutes(Integer.parseInt(timeValue.substring(i, lookAhead))); } else if (timeValue.charAt(lookAhead) == 'S') { - setSeconds(number); + setSeconds(Double.parseDouble(timeValue.substring(i, lookAhead))); } i = lookAhead; } diff --git a/pom.xml b/pom.xml index 0f954af9e9..8f35abc44e 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ 2.7.1 - 42.5.3 + 42.5.4 11.2.1.jre11 21.7.0.0