diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2022-10-23 08:04:06 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2022-10-23 11:51:34 +0200 |
commit | e59db840207551430ac9f12be6ee4aa2a594fe66 (patch) | |
tree | 28e58cc731d2cb21a55a264d3d93e53626d2fbe2 | |
parent | ead61297f615123e44313a8c16b581fbccbae6ba (diff) |
fix: TemporalExtensions: Work around template extension type resolution wonkiness.
Change-Id: I3e278bd1c8b03dd55d255fab1a0ca6d94cafbdde
-rw-r--r-- | src/main/java/eu/mulk/mulkcms2/common/template/TemporalExtensions.java | 8 |
1 files changed, 5 insertions, 3 deletions
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; } |