From 5f5c950769f97105fc0cb8aa19377301cc919a88 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 16 Aug 2024 11:43:29 +0000 Subject: [PATCH 1/7] fix(deps): update micronaut to v4.6.1 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ad46052ca..d745a2858 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -micronaut = "4.5.4" +micronaut = "4.6.1" micronaut-platform = "4.3.1" micronaut-docs = '2.0.0' micronaut-test = "4.0.1" From 2096d1cdc7e6e41932c1bc866f6e6478d7f8b012 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 16 Aug 2024 21:25:29 +0000 Subject: [PATCH 2/7] fix(deps): update dependency io.micronaut.serde:micronaut-serde-bom to v2.11.0 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d745a2858..6d635b659 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,7 +6,7 @@ micronaut-test = "4.0.1" micronaut-data = "4.9.0" micronaut-sql = "5.7.0" micronaut-security = "4.9.1" -micronaut-serde = "2.10.2" +micronaut-serde = "2.11.0" micronaut-validation = "4.6.1" micronaut-gradle-plugin = "4.4.2" managed-freemarker = "2.3.33" From fbcc0817b2460e18fbbd97f00ff18e028e13ba1c Mon Sep 17 00:00:00 2001 From: Sergio del Amo Caballero Date: Mon, 19 Aug 2024 10:21:33 +0200 Subject: [PATCH 3/7] test 4.4.0 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6d635b659..b237ce7cf 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,7 +2,7 @@ micronaut = "4.6.1" micronaut-platform = "4.3.1" micronaut-docs = '2.0.0' -micronaut-test = "4.0.1" +micronaut-test = "4.4.0" micronaut-data = "4.9.0" micronaut-sql = "5.7.0" micronaut-security = "4.9.1" From d304d287a12809c6679f5a6d77ccbfa079a52496 Mon Sep 17 00:00:00 2001 From: Sergio del Amo Caballero Date: Mon, 19 Aug 2024 10:21:40 +0200 Subject: [PATCH 4/7] SQL 5.8.1 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b237ce7cf..f0ee246c6 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,7 +4,7 @@ micronaut-platform = "4.3.1" micronaut-docs = '2.0.0' micronaut-test = "4.4.0" micronaut-data = "4.9.0" -micronaut-sql = "5.7.0" +micronaut-sql = "5.8.1" micronaut-security = "4.9.1" micronaut-serde = "2.11.0" micronaut-validation = "4.6.1" From e74ef4b02b5f2b113d4feb63f0bca49054c8bc43 Mon Sep 17 00:00:00 2001 From: Sergio del Amo Caballero Date: Mon, 19 Aug 2024 10:21:46 +0200 Subject: [PATCH 5/7] validation 4.7.0 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f0ee246c6..0a402ab04 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -7,7 +7,7 @@ micronaut-data = "4.9.0" micronaut-sql = "5.8.1" micronaut-security = "4.9.1" micronaut-serde = "2.11.0" -micronaut-validation = "4.6.1" +micronaut-validation = "4.7.0" micronaut-gradle-plugin = "4.4.2" managed-freemarker = "2.3.33" managed-handlebars = "4.3.1" From d1496404254b61c6d7d35b16bd71262b27eb5100 Mon Sep 17 00:00:00 2001 From: Sergio del Amo Caballero Date: Mon, 19 Aug 2024 10:26:55 +0200 Subject: [PATCH 6/7] platform 4.5.1 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 0a402ab04..b79376e39 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] micronaut = "4.6.1" -micronaut-platform = "4.3.1" +micronaut-platform = "4.5.1" micronaut-docs = '2.0.0' micronaut-test = "4.4.0" micronaut-data = "4.9.0" From 8524b53a94660bb6320f76212628b86640341be4 Mon Sep 17 00:00:00 2001 From: Denis Stepanov Date: Tue, 20 Aug 2024 10:56:39 +0200 Subject: [PATCH 7/7] Correct --- .../HtmxResponseRawMessageBodyHandler.java | 28 ++----------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/views-htmx/src/main/java/io/micronaut/views/htmx/http/HtmxResponseRawMessageBodyHandler.java b/views-htmx/src/main/java/io/micronaut/views/htmx/http/HtmxResponseRawMessageBodyHandler.java index d1070c4bb..b5f10a3a5 100644 --- a/views-htmx/src/main/java/io/micronaut/views/htmx/http/HtmxResponseRawMessageBodyHandler.java +++ b/views-htmx/src/main/java/io/micronaut/views/htmx/http/HtmxResponseRawMessageBodyHandler.java @@ -17,40 +17,33 @@ import io.micronaut.core.annotation.Internal; import io.micronaut.core.annotation.NonNull; -import io.micronaut.core.annotation.Nullable; -import io.micronaut.core.io.buffer.ByteBuffer; import io.micronaut.core.type.Argument; -import io.micronaut.core.type.Headers; import io.micronaut.core.type.MutableHeaders; import io.micronaut.http.HttpHeaders; import io.micronaut.http.HttpRequest; import io.micronaut.http.MediaType; -import io.micronaut.http.body.RawMessageBodyHandler; +import io.micronaut.http.body.MessageBodyWriter; import io.micronaut.http.codec.CodecException; import io.micronaut.http.context.ServerRequestContext; import io.micronaut.views.ModelAndView; import io.micronaut.views.ModelAndViewRenderer; import io.micronaut.views.exceptions.ViewRenderingException; import jakarta.inject.Singleton; -import org.reactivestreams.Publisher; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; -import java.io.InputStream; import java.io.OutputStream; -import java.util.Collection; -import java.util.Collections; /** - * {@link RawMessageBodyHandler} implementation for {@link HtmxResponse}. + * {@link io.micronaut.http.body.MessageBodyHandler} implementation for {@link HtmxResponse}. * @author Sergio del Amo * @since 5.2.0 * @param The model type */ @Internal @Singleton -final class HtmxResponseRawMessageBodyHandler implements RawMessageBodyHandler> { +final class HtmxResponseRawMessageBodyHandler implements MessageBodyWriter> { private static final Logger LOG = LoggerFactory.getLogger(HtmxResponseRawMessageBodyHandler.class); private final ModelAndViewRenderer> modelAndViewRenderer; @@ -59,21 +52,6 @@ public HtmxResponseRawMessageBodyHandler(ModelAndViewRenderer> this.modelAndViewRenderer = modelAndViewRenderer; } - @Override - public @NonNull Collection> getTypes() { - return Collections.singletonList(HtmxResponse.class); - } - - @Override - public @NonNull Publisher> readChunked(@NonNull Argument> type, @Nullable MediaType mediaType, @NonNull Headers httpHeaders, @NonNull Publisher> input) { - throw new UnsupportedOperationException("Not supported"); - } - - @Override - public @Nullable HtmxResponse read(@NonNull Argument> type, @Nullable MediaType mediaType, @NonNull Headers httpHeaders, @NonNull InputStream inputStream) throws CodecException { - throw new UnsupportedOperationException("Not supported"); - } - @Override public void writeTo(@NonNull Argument> type, @NonNull MediaType mediaType, HtmxResponse object, @NonNull MutableHeaders outgoingHeaders, @NonNull OutputStream outputStream) throws CodecException { HttpRequest httpRequest = ServerRequestContext.currentRequest().orElse(null);