From e59db840207551430ac9f12be6ee4aa2a594fe66 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 23 Oct 2022 08:04:06 +0200 Subject: fix: TemporalExtensions: Work around template extension type resolution wonkiness. Change-Id: I3e278bd1c8b03dd55d255fab1a0ca6d94cafbdde --- .../java/eu/mulk/mulkcms2/common/template/TemporalExtensions.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/eu/mulk/mulkcms2/common/template/TemporalExtensions.java b/src/main/java/eu/mulk/mulkcms2/common/template/TemporalExtensions.java index 35d6d32..858b557 100644 --- a/src/main/java/eu/mulk/mulkcms2/common/template/TemporalExtensions.java +++ b/src/main/java/eu/mulk/mulkcms2/common/template/TemporalExtensions.java @@ -1,8 +1,10 @@ package eu.mulk.mulkcms2.common.template; import io.quarkus.qute.TemplateExtension; +import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.time.format.FormatStyle; +import java.time.temporal.Temporal; import java.time.temporal.TemporalAccessor; import javax.annotation.CheckForNull; @@ -21,7 +23,7 @@ public class TemporalExtensions { @TemplateExtension @CheckForNull - static String humanDateTime(@CheckForNull TemporalAccessor x) { + static String humanDateTime(@CheckForNull Temporal x) { if (x == null) { return null; } @@ -39,7 +41,7 @@ public class TemporalExtensions { @TemplateExtension @CheckForNull - static String humanDate(@CheckForNull TemporalAccessor x) { + static String humanDate(@CheckForNull Temporal x) { if (x == null) { return null; } @@ -48,7 +50,7 @@ public class TemporalExtensions { @TemplateExtension @CheckForNull - static String htmlDate(@CheckForNull TemporalAccessor x) { + static String htmlDate(@CheckForNull LocalDate x) { if (x == null) { return null; } -- cgit v1.2.3