diff --git a/jooby/pom.xml b/jooby/pom.xml index 6d7c9e856c..1f0d8e7a51 100644 --- a/jooby/pom.xml +++ b/jooby/pom.xml @@ -6,7 +6,7 @@ io.jooby jooby-project - 3.11.3 + 3.11.4 jooby jooby diff --git a/modules/jooby-apt/pom.xml b/modules/jooby-apt/pom.xml index 10f49d9f6d..867031c7ee 100644 --- a/modules/jooby-apt/pom.xml +++ b/modules/jooby-apt/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-apt jooby-apt diff --git a/modules/jooby-avaje-inject/pom.xml b/modules/jooby-avaje-inject/pom.xml index 2e3afa07de..191c0e7e82 100644 --- a/modules/jooby-avaje-inject/pom.xml +++ b/modules/jooby-avaje-inject/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-avaje-inject jooby-avaje-inject diff --git a/modules/jooby-avaje-jsonb/pom.xml b/modules/jooby-avaje-jsonb/pom.xml index d728de8dd9..adc53af031 100644 --- a/modules/jooby-avaje-jsonb/pom.xml +++ b/modules/jooby-avaje-jsonb/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-avaje-jsonb jooby-avaje-jsonb diff --git a/modules/jooby-avaje-validator/pom.xml b/modules/jooby-avaje-validator/pom.xml index 082abd2626..5c7f84c203 100644 --- a/modules/jooby-avaje-validator/pom.xml +++ b/modules/jooby-avaje-validator/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-avaje-validator jooby-avaje-validator diff --git a/modules/jooby-awssdk-v1/pom.xml b/modules/jooby-awssdk-v1/pom.xml index d3f38be396..1f7c09818c 100644 --- a/modules/jooby-awssdk-v1/pom.xml +++ b/modules/jooby-awssdk-v1/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-awssdk-v1 jooby-awssdk-v1 diff --git a/modules/jooby-awssdk-v2/pom.xml b/modules/jooby-awssdk-v2/pom.xml index a63752e558..296181ed57 100644 --- a/modules/jooby-awssdk-v2/pom.xml +++ b/modules/jooby-awssdk-v2/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-awssdk-v2 jooby-awssdk-v2 diff --git a/modules/jooby-bom/pom.xml b/modules/jooby-bom/pom.xml index 75b1b66505..934f22d3aa 100644 --- a/modules/jooby-bom/pom.xml +++ b/modules/jooby-bom/pom.xml @@ -7,14 +7,14 @@ io.jooby modules - 3.11.3 + 3.11.4 io.jooby jooby-bom jooby-bom pom - 3.11.3 + 3.11.4 Jooby (Bill of Materials) https://jooby.io diff --git a/modules/jooby-caffeine/pom.xml b/modules/jooby-caffeine/pom.xml index 93aa2b6a90..dc68ec824f 100644 --- a/modules/jooby-caffeine/pom.xml +++ b/modules/jooby-caffeine/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-caffeine jooby-caffeine diff --git a/modules/jooby-camel/pom.xml b/modules/jooby-camel/pom.xml index 0453b01138..b131f0507d 100644 --- a/modules/jooby-camel/pom.xml +++ b/modules/jooby-camel/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-camel jooby-camel diff --git a/modules/jooby-cli/pom.xml b/modules/jooby-cli/pom.xml index 48c6b6d221..aa8870248b 100644 --- a/modules/jooby-cli/pom.xml +++ b/modules/jooby-cli/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-cli jooby-cli diff --git a/modules/jooby-commons-email/pom.xml b/modules/jooby-commons-email/pom.xml index 5a8cca995d..286123a1e5 100644 --- a/modules/jooby-commons-email/pom.xml +++ b/modules/jooby-commons-email/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-commons-email jooby-commons-email diff --git a/modules/jooby-conscrypt/pom.xml b/modules/jooby-conscrypt/pom.xml index 3a79e857a3..d941a9a31f 100644 --- a/modules/jooby-conscrypt/pom.xml +++ b/modules/jooby-conscrypt/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-conscrypt jooby-conscrypt diff --git a/modules/jooby-db-scheduler/pom.xml b/modules/jooby-db-scheduler/pom.xml index 8b4e6a9082..6c39699f2e 100644 --- a/modules/jooby-db-scheduler/pom.xml +++ b/modules/jooby-db-scheduler/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-db-scheduler jooby-db-scheduler diff --git a/modules/jooby-distribution/pom.xml b/modules/jooby-distribution/pom.xml index 1e29b39db3..2f2bf3542a 100644 --- a/modules/jooby-distribution/pom.xml +++ b/modules/jooby-distribution/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-distribution jooby-distribution diff --git a/modules/jooby-ebean/pom.xml b/modules/jooby-ebean/pom.xml index f00335fada..19e0c6d830 100644 --- a/modules/jooby-ebean/pom.xml +++ b/modules/jooby-ebean/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-ebean jooby-ebean diff --git a/modules/jooby-flyway/pom.xml b/modules/jooby-flyway/pom.xml index 90b63507ef..96b43e588e 100644 --- a/modules/jooby-flyway/pom.xml +++ b/modules/jooby-flyway/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-flyway jooby-flyway diff --git a/modules/jooby-freemarker/pom.xml b/modules/jooby-freemarker/pom.xml index 427f27b1e6..45ce983f5b 100644 --- a/modules/jooby-freemarker/pom.xml +++ b/modules/jooby-freemarker/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-freemarker jooby-freemarker diff --git a/modules/jooby-gradle-setup/pom.xml b/modules/jooby-gradle-setup/pom.xml index 0b23f0d420..c1b4915edd 100644 --- a/modules/jooby-gradle-setup/pom.xml +++ b/modules/jooby-gradle-setup/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-gradle-setup jooby-gradle-setup diff --git a/modules/jooby-graphiql/pom.xml b/modules/jooby-graphiql/pom.xml index 7313f8c177..0f342bf399 100644 --- a/modules/jooby-graphiql/pom.xml +++ b/modules/jooby-graphiql/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-graphiql jooby-graphiql diff --git a/modules/jooby-graphql/pom.xml b/modules/jooby-graphql/pom.xml index cb2706730e..76de73dff9 100644 --- a/modules/jooby-graphql/pom.xml +++ b/modules/jooby-graphql/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-graphql jooby-graphql diff --git a/modules/jooby-gson/pom.xml b/modules/jooby-gson/pom.xml index 302fd60860..ad4d6ac69a 100644 --- a/modules/jooby-gson/pom.xml +++ b/modules/jooby-gson/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-gson jooby-gson diff --git a/modules/jooby-guice/pom.xml b/modules/jooby-guice/pom.xml index 2092fcef09..cc36960d46 100644 --- a/modules/jooby-guice/pom.xml +++ b/modules/jooby-guice/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-guice jooby-guice diff --git a/modules/jooby-handlebars/pom.xml b/modules/jooby-handlebars/pom.xml index 53ce293c34..a39a5acdf7 100644 --- a/modules/jooby-handlebars/pom.xml +++ b/modules/jooby-handlebars/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-handlebars jooby-handlebars diff --git a/modules/jooby-hibernate-validator/pom.xml b/modules/jooby-hibernate-validator/pom.xml index ff4a912c62..064b812131 100644 --- a/modules/jooby-hibernate-validator/pom.xml +++ b/modules/jooby-hibernate-validator/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-hibernate-validator jooby-hibernate-validator diff --git a/modules/jooby-hibernate/pom.xml b/modules/jooby-hibernate/pom.xml index f8afd16c80..bd63de1b8f 100644 --- a/modules/jooby-hibernate/pom.xml +++ b/modules/jooby-hibernate/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-hibernate jooby-hibernate diff --git a/modules/jooby-hikari/pom.xml b/modules/jooby-hikari/pom.xml index 3b05fbdcdb..d925de8ec7 100644 --- a/modules/jooby-hikari/pom.xml +++ b/modules/jooby-hikari/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-hikari jooby-hikari diff --git a/modules/jooby-jackson/pom.xml b/modules/jooby-jackson/pom.xml index e8448b6265..add7a5d1ab 100644 --- a/modules/jooby-jackson/pom.xml +++ b/modules/jooby-jackson/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-jackson jooby-jackson diff --git a/modules/jooby-jasypt/pom.xml b/modules/jooby-jasypt/pom.xml index c02202fb74..3e5debf033 100644 --- a/modules/jooby-jasypt/pom.xml +++ b/modules/jooby-jasypt/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-jasypt jooby-jasypt diff --git a/modules/jooby-jdbi/pom.xml b/modules/jooby-jdbi/pom.xml index b9624a8457..5a228fa92c 100644 --- a/modules/jooby-jdbi/pom.xml +++ b/modules/jooby-jdbi/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-jdbi jooby-jdbi diff --git a/modules/jooby-jetty/pom.xml b/modules/jooby-jetty/pom.xml index d0673d054f..ec3a64ef17 100644 --- a/modules/jooby-jetty/pom.xml +++ b/modules/jooby-jetty/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-jetty jooby-jetty diff --git a/modules/jooby-jstachio/pom.xml b/modules/jooby-jstachio/pom.xml index 67192f20cf..cbe23ada45 100644 --- a/modules/jooby-jstachio/pom.xml +++ b/modules/jooby-jstachio/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-jstachio jooby-jstachio diff --git a/modules/jooby-jte/pom.xml b/modules/jooby-jte/pom.xml index b9a7ce081f..a441be88df 100644 --- a/modules/jooby-jte/pom.xml +++ b/modules/jooby-jte/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-jte jooby-jte diff --git a/modules/jooby-jwt/pom.xml b/modules/jooby-jwt/pom.xml index 923a78e77e..259cbb38af 100644 --- a/modules/jooby-jwt/pom.xml +++ b/modules/jooby-jwt/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-jwt jooby-jwt diff --git a/modules/jooby-kafka/pom.xml b/modules/jooby-kafka/pom.xml index d98ceb0923..e68a9aacd2 100644 --- a/modules/jooby-kafka/pom.xml +++ b/modules/jooby-kafka/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-kafka jooby-kafka diff --git a/modules/jooby-kotlin/pom.xml b/modules/jooby-kotlin/pom.xml index e7280af29d..e3e1b3e6ac 100644 --- a/modules/jooby-kotlin/pom.xml +++ b/modules/jooby-kotlin/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-kotlin jooby-kotlin diff --git a/modules/jooby-log4j/pom.xml b/modules/jooby-log4j/pom.xml index 9d8cc0a747..d83a195b8e 100644 --- a/modules/jooby-log4j/pom.xml +++ b/modules/jooby-log4j/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-log4j jooby-log4j diff --git a/modules/jooby-logback/pom.xml b/modules/jooby-logback/pom.xml index 1ebea3ec96..51cf6b413a 100644 --- a/modules/jooby-logback/pom.xml +++ b/modules/jooby-logback/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-logback jooby-logback diff --git a/modules/jooby-maven-plugin/pom.xml b/modules/jooby-maven-plugin/pom.xml index 3931b58fd8..4e263e678b 100644 --- a/modules/jooby-maven-plugin/pom.xml +++ b/modules/jooby-maven-plugin/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-maven-plugin jooby-maven-plugin diff --git a/modules/jooby-metrics/pom.xml b/modules/jooby-metrics/pom.xml index 69b0b0cc40..bb8a05ae05 100644 --- a/modules/jooby-metrics/pom.xml +++ b/modules/jooby-metrics/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-metrics jooby-metrics diff --git a/modules/jooby-mutiny/pom.xml b/modules/jooby-mutiny/pom.xml index 713840ed3b..770616594f 100644 --- a/modules/jooby-mutiny/pom.xml +++ b/modules/jooby-mutiny/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-mutiny jooby-mutiny diff --git a/modules/jooby-netty/pom.xml b/modules/jooby-netty/pom.xml index 453747cca3..810c6747b0 100644 --- a/modules/jooby-netty/pom.xml +++ b/modules/jooby-netty/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-netty jooby-netty diff --git a/modules/jooby-netty/src/main/java/io/jooby/internal/netty/NettyHandler.java b/modules/jooby-netty/src/main/java/io/jooby/internal/netty/NettyHandler.java index 77b4440615..c83faf3e4f 100644 --- a/modules/jooby-netty/src/main/java/io/jooby/internal/netty/NettyHandler.java +++ b/modules/jooby-netty/src/main/java/io/jooby/internal/netty/NettyHandler.java @@ -35,7 +35,6 @@ public class NettyHandler extends ChannelInboundHandlerAdapter { private final boolean defaultHeaders; private final long maxRequestSize; private final int maxFormFields; - private long contentLength; private long chunkSize; private final boolean http2; private NettyContext context; @@ -78,7 +77,7 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) { router.match(context).execute(context); } else { // possibly body: - contentLength = contentLength(req); + long contentLength = contentLength(req); if (contentLength > 0 || isTransferEncodingChunked(req)) { context.httpDataFactory = new DefaultHttpDataFactory(bufferSize); context.httpDataFactory.setBaseDir(app.getTmpdir().toString()); @@ -88,20 +87,6 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) { router.match(context).execute(context); } } - } else if (isLastHttpContent(msg)) { - var chunk = (HttpContent) msg; - try { - // when decoder == null, chunk is always a LastHttpContent.EMPTY, ignore it - if (context.decoder != null) { - if (offer(context, chunk)) { - Router.Match route = router.match(context); - resetDecoderState(context, !route.matches()); - route.execute(context); - } - } - } finally { - release(chunk); - } } else if (isHttpContent(msg)) { var chunk = (HttpContent) msg; try { @@ -113,10 +98,13 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) { router.match(context).execute(context, Route.REQUEST_ENTITY_TOO_LARGE); return; } - offer(context, chunk); + if (offer(context, chunk) && isLastHttpContent(msg)) { + Router.Match route = router.match(context); + resetDecoderState(context, !route.matches()); + route.execute(context); + } } } finally { - // must be released release(chunk); } } else if (isWebSocketFrame(msg)) { @@ -191,7 +179,6 @@ private boolean offer(NettyContext context, HttpContent chunk) { private void resetDecoderState(NettyContext context, boolean destroy) { chunkSize = 0; - contentLength = -1; if (destroy && context.decoder != null) { var decoder = context.decoder; var httpDataFactory = context.httpDataFactory; diff --git a/modules/jooby-openapi/pom.xml b/modules/jooby-openapi/pom.xml index 6cd177515c..a267150412 100644 --- a/modules/jooby-openapi/pom.xml +++ b/modules/jooby-openapi/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-openapi jooby-openapi diff --git a/modules/jooby-pac4j/pom.xml b/modules/jooby-pac4j/pom.xml index 4e9aa6396b..8829a8e5a8 100644 --- a/modules/jooby-pac4j/pom.xml +++ b/modules/jooby-pac4j/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-pac4j jooby-pac4j diff --git a/modules/jooby-pebble/pom.xml b/modules/jooby-pebble/pom.xml index 6af4e2a13b..a37c4232a2 100644 --- a/modules/jooby-pebble/pom.xml +++ b/modules/jooby-pebble/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-pebble jooby-pebble diff --git a/modules/jooby-quartz/pom.xml b/modules/jooby-quartz/pom.xml index dcb7ddf2ec..e53b37fa22 100644 --- a/modules/jooby-quartz/pom.xml +++ b/modules/jooby-quartz/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-quartz jooby-quartz diff --git a/modules/jooby-reactor/pom.xml b/modules/jooby-reactor/pom.xml index b2d1ddf8e5..a0f7867e4d 100644 --- a/modules/jooby-reactor/pom.xml +++ b/modules/jooby-reactor/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-reactor jooby-reactor diff --git a/modules/jooby-redis/pom.xml b/modules/jooby-redis/pom.xml index 028168af77..8b1f832965 100644 --- a/modules/jooby-redis/pom.xml +++ b/modules/jooby-redis/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-redis jooby-redis diff --git a/modules/jooby-redoc/pom.xml b/modules/jooby-redoc/pom.xml index d703607444..7b64bc2929 100644 --- a/modules/jooby-redoc/pom.xml +++ b/modules/jooby-redoc/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-redoc jooby-redoc diff --git a/modules/jooby-rocker/pom.xml b/modules/jooby-rocker/pom.xml index 91a99bbf54..5faebc687f 100644 --- a/modules/jooby-rocker/pom.xml +++ b/modules/jooby-rocker/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-rocker jooby-rocker diff --git a/modules/jooby-run/pom.xml b/modules/jooby-run/pom.xml index f822be1a65..65a1292054 100644 --- a/modules/jooby-run/pom.xml +++ b/modules/jooby-run/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-run jooby-run diff --git a/modules/jooby-run/src/main/java/io/jooby/internal/run/JoobyModuleFinder.java b/modules/jooby-run/src/main/java/io/jooby/internal/run/JoobyModuleFinder.java index df30de02c4..c933b390f3 100644 --- a/modules/jooby-run/src/main/java/io/jooby/internal/run/JoobyModuleFinder.java +++ b/modules/jooby-run/src/main/java/io/jooby/internal/run/JoobyModuleFinder.java @@ -7,8 +7,8 @@ import static java.util.stream.Collectors.joining; import static org.jboss.modules.ResourceLoaderSpec.createResourceLoaderSpec; -import static org.jboss.modules.ResourceLoaders.createJarResourceLoader; -import static org.jboss.modules.ResourceLoaders.createPathResourceLoader; +import static org.jboss.modules.ResourceLoaders.*; +import static org.jboss.modules.filter.PathFilters.not; import java.io.File; import java.io.IOException; @@ -23,12 +23,7 @@ import java.util.Set; import java.util.jar.JarFile; -import org.jboss.modules.DependencySpec; -import org.jboss.modules.ModuleDependencySpecBuilder; -import org.jboss.modules.ModuleFinder; -import org.jboss.modules.ModuleSpec; -import org.jboss.modules.PathUtils; -import org.jboss.modules.ResourceLoaderSpec; +import org.jboss.modules.*; import org.jboss.modules.filter.PathFilters; import io.jooby.run.JoobyRun; @@ -73,8 +68,7 @@ private static Path joobyRunHook(Class loader) { } } - public static ModuleSpec createModuleSpec( - String name, Set resources, Set dependencies) { + public ModuleSpec createModuleSpec(String name, Set resources, Set dependencies) { ModuleSpec.Builder builder = newModule(name, resources); // dependencies @@ -90,7 +84,7 @@ public static ModuleSpec createModuleSpec( return builder.create(); } - private static ModuleSpec.Builder newModule(String name, Set resources) { + private ModuleSpec.Builder newModule(String name, Set resources) { try { ModuleSpec.Builder builder = ModuleSpec.build(name); // Add all JDK classes @@ -102,8 +96,20 @@ private static ModuleSpec.Builder newModule(String name, Set resources) { for (Path path : resources) { if (Files.isDirectory(path)) { - builder.addResourceRoot( - ResourceLoaderSpec.createResourceLoaderSpec(createPathResourceLoader(path))); + var resourceLoader = createPathResourceLoader(path); + if (main.equals(name)) { + resourceLoader = + createFilteredResourceLoader( + not( + it -> + // remove duplicated log configuration + (it.startsWith("logback") || it.startsWith("log4j")) + && it.endsWith(".xml") + // remove duplicated configuration + || (it.startsWith("application") && it.endsWith(".conf"))), + resourceLoader); + } + builder.addResourceRoot(ResourceLoaderSpec.createResourceLoaderSpec(resourceLoader)); } else { builder.addResourceRoot( createResourceLoaderSpec(createJarResourceLoader(new JarFile(path.toFile())))); @@ -117,7 +123,7 @@ private static ModuleSpec.Builder newModule(String name, Set resources) { @Override public String toString() { - return "classes: " + return "main: " + classes.stream().map(Path::toString).collect(joining(File.pathSeparator)) + "\nresources: " + resources.stream().map(Path::toString).collect(joining(File.pathSeparator)) diff --git a/modules/jooby-run/src/main/java/io/jooby/internal/run/JoobyMultiModuleFinder.java b/modules/jooby-run/src/main/java/io/jooby/internal/run/JoobyMultiModuleFinder.java index 64fb89378a..cfe643e832 100644 --- a/modules/jooby-run/src/main/java/io/jooby/internal/run/JoobyMultiModuleFinder.java +++ b/modules/jooby-run/src/main/java/io/jooby/internal/run/JoobyMultiModuleFinder.java @@ -16,7 +16,11 @@ /** * The new class loader since 3.x. It creates 3 modules with their own classloader: * - *

- classes: project classes - resources: project resources - jars: project dependencies + *

    + *
  • classes: project classes + *
  • resources: project resources + *
  • jars: project dependencies + *
* *

This approach reduce memory footprint allowing fast restart. */ diff --git a/modules/jooby-rxjava3/pom.xml b/modules/jooby-rxjava3/pom.xml index 4efb13bfed..570a716a9b 100644 --- a/modules/jooby-rxjava3/pom.xml +++ b/modules/jooby-rxjava3/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-rxjava3 jooby-rxjava3 diff --git a/modules/jooby-stork/pom.xml b/modules/jooby-stork/pom.xml index aecb5d83fa..65ec0180e0 100644 --- a/modules/jooby-stork/pom.xml +++ b/modules/jooby-stork/pom.xml @@ -4,7 +4,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-stork diff --git a/modules/jooby-swagger-ui/pom.xml b/modules/jooby-swagger-ui/pom.xml index e7851afd2e..219978b5bc 100644 --- a/modules/jooby-swagger-ui/pom.xml +++ b/modules/jooby-swagger-ui/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-swagger-ui jooby-swagger-ui diff --git a/modules/jooby-test/pom.xml b/modules/jooby-test/pom.xml index fa070f19a7..aa7e0c6bb4 100644 --- a/modules/jooby-test/pom.xml +++ b/modules/jooby-test/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-test jooby-test diff --git a/modules/jooby-thymeleaf/pom.xml b/modules/jooby-thymeleaf/pom.xml index 4abdea010e..d289477549 100644 --- a/modules/jooby-thymeleaf/pom.xml +++ b/modules/jooby-thymeleaf/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-thymeleaf jooby-thymeleaf diff --git a/modules/jooby-undertow/pom.xml b/modules/jooby-undertow/pom.xml index 9971abe61b..240b99004c 100644 --- a/modules/jooby-undertow/pom.xml +++ b/modules/jooby-undertow/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-undertow jooby-undertow diff --git a/modules/jooby-whoops/pom.xml b/modules/jooby-whoops/pom.xml index a4f8ff7e9c..e64b84b746 100644 --- a/modules/jooby-whoops/pom.xml +++ b/modules/jooby-whoops/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-whoops jooby-whoops diff --git a/modules/jooby-yasson/pom.xml b/modules/jooby-yasson/pom.xml index c583aa5a1c..018fbb2f94 100644 --- a/modules/jooby-yasson/pom.xml +++ b/modules/jooby-yasson/pom.xml @@ -6,7 +6,7 @@ io.jooby modules - 3.11.3 + 3.11.4 jooby-yasson jooby-yasson diff --git a/modules/pom.xml b/modules/pom.xml index 274f9c3c1f..0e6162ecf2 100644 --- a/modules/pom.xml +++ b/modules/pom.xml @@ -4,7 +4,7 @@ io.jooby jooby-project - 3.11.3 + 3.11.4 modules diff --git a/pom.xml b/pom.xml index caf4f779a2..47c4ca5ac9 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 io.jooby jooby-project - 3.11.3 + 3.11.4 pom jooby-project @@ -72,9 +72,9 @@ 6.3.3 1.2 - 6.6.22.Final + 6.6.33.Final 15.11.0 - 3.49.5 + 3.49.6 11.14.0 24.1 6.7.1.RELEASE @@ -82,13 +82,13 @@ 4.0.0 3.2.2 - 1.4.4 + 1.4.5 7.0.0 - 1.5.19 + 1.5.20 2.25.1 2.0.17 @@ -99,18 +99,18 @@ 4.2.37 - 2.1.6.Final + 2.2.0.Final - 9.8 + 9.9 - 2.3.18.Final + 2.3.20.Final 12.1.2 - 4.2.6.Final + 4.2.7.Final - 2.2.34 + 2.2.39 2.1.31 2.0.0-rc.20 @@ -126,11 +126,11 @@ 2.0.1.MR 3.1.1 4.0.0 - 4.9.6 + 4.9.8 - 5.1.0 - 0.12.6 + 5.2.1 + 0.13.0 6.2.2 2.5.0 9.2.1 @@ -154,7 +154,7 @@ 5.20.0 33.5.0-jre - 0.21.0 + 0.23.0 1.4.5 @@ -207,7 +207,7 @@ false yyyy-MM-dd HH:mm:ssa - 2025-10-14T00:05:09Z + 2025-10-20T12:43:04Z UTF-8 etc${file.separator}source${file.separator}formatter.sh diff --git a/tests/pom.xml b/tests/pom.xml index 189835603c..b1e42a4ae1 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -6,7 +6,7 @@ io.jooby jooby-project - 3.11.3 + 3.11.4 tests tests diff --git a/tests/src/test/java/io/jooby/i2806/Issue2806.java b/tests/src/test/java/io/jooby/i2806/Issue2806.java index 3b5ff321e5..208af9a784 100644 --- a/tests/src/test/java/io/jooby/i2806/Issue2806.java +++ b/tests/src/test/java/io/jooby/i2806/Issue2806.java @@ -5,9 +5,9 @@ */ package io.jooby.i2806; +import static io.jooby.test.TestUtil._19kb; import static org.junit.jupiter.api.Assertions.assertEquals; -import java.util.Arrays; import java.util.Map; import com.google.common.collect.ImmutableMap; @@ -22,9 +22,6 @@ public class Issue2806 { @ServerTest public void renderShouldWorkFromErrorHandlerWhenLargeRequestAreSent(ServerTestRunner runner) { - char[] chars = new char[19 * 1024]; - Arrays.fill(chars, 'S'); - String _19kb = new String(chars); runner .define( app -> { @@ -43,20 +40,32 @@ public void renderShouldWorkFromErrorHandlerWhenLargeRequestAreSent(ServerTestRu ctx.render(map); }); - app.post("/2806", ctx -> ctx.body().value("")); + app.post( + "/2806", + ctx -> { + return ctx.body().value(""); + }); app.get("/2806", ctx -> ctx.body().value("")); }) .ready( client -> { // Exceeds - client.post( - "/2806", - RequestBody.create(_19kb, MediaType.get("text/plain")), - rsp -> { - assertEquals(413, rsp.code()); - assertEquals("{\"router\":true,\"route\":true}", rsp.body().string()); - }); + client + .post("/2806", RequestBody.create(_19kb, MediaType.get("text/plain"))) + .execute( + rsp -> { + assertEquals(413, rsp.code()); + assertEquals("{\"router\":true,\"route\":true}", rsp.body().string()); + }); + + client + .get("/2806") + .execute( + rsp -> { + assertEquals(200, rsp.code()); + assertEquals("", rsp.body().string()); + }); }); } } diff --git a/tests/src/test/java/io/jooby/test/WebClient.java b/tests/src/test/java/io/jooby/test/WebClient.java index 93d622b98e..93607e41ed 100644 --- a/tests/src/test/java/io/jooby/test/WebClient.java +++ b/tests/src/test/java/io/jooby/test/WebClient.java @@ -14,10 +14,7 @@ import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.List; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; +import java.util.concurrent.*; import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.BiConsumer; import java.util.function.Consumer; @@ -142,17 +139,46 @@ public void close() { public class Request { private final okhttp3.Request.Builder req; + private SneakyThrows.Consumer configurer; public Request(okhttp3.Request.Builder req) { this.req = req; } public Request prepare(SneakyThrows.Consumer configurer) { - configurer.accept(req); + this.configurer = configurer; return this; } public void execute(SneakyThrows.Consumer callback) { + execute(1, callback); + } + + public void execute(int concurrency, SneakyThrows.Consumer callback) { + if (configurer != null) { + configurer.accept(req); + } + if (concurrency > 1) { + var futures = new ArrayList>(); + for (var i = 0; i < concurrency; i++) { + futures.add( + CompletableFuture.supplyAsync( + () -> { + executeCall(callback); + return "success"; + })); + try { + CompletableFuture.allOf(futures.toArray(new CompletableFuture[0])).join(); + } catch (CompletionException x) { + throw SneakyThrows.propagate(x.getCause()); + } + } + } else { + executeCall(callback); + } + } + + private void executeCall(SneakyThrows.Consumer callback) { okhttp3.Request r = req.build(); try (Response rsp = client.newCall(r).execute()) { callback.accept(rsp);