diff --git a/avaje-jex/src/main/java/io/avaje/jex/Context.java b/avaje-jex/src/main/java/io/avaje/jex/Context.java index 2e556b07..6ba2bcf2 100644 --- a/avaje-jex/src/main/java/io/avaje/jex/Context.java +++ b/avaje-jex/src/main/java/io/avaje/jex/Context.java @@ -361,7 +361,15 @@ default Context render(String name) { */ String protocol(); - class Cookie { + /** + * Gets basic-auth credentials from the request, or throws. + * + *
Returns a wrapper object containing the Base64 decoded username + * and password from the Authorization header, or null if basic-auth is not properly configured + */ + BasicAuthCredentials basicAuthCredentials(); + + final class Cookie { private static final ZonedDateTime EXPIRED = ZonedDateTime.of(LocalDateTime.of(2000, 1, 1, 0, 0, 0), ZoneId.of("GMT")); private static final DateTimeFormatter RFC_1123_DATE_TIME = DateTimeFormatter.RFC_1123_DATE_TIME; private static final String PARAM_SEPARATOR = "; "; @@ -375,7 +383,7 @@ class Cookie { private boolean httpOnly; private Cookie(String name, String value) { - if (name == null || name.length() == 0) { + if (name == null || name.isEmpty()) { throw new IllegalArgumentException("name required"); } this.name = name; @@ -492,12 +500,4 @@ public String toString() { } } - /** - * Gets basic-auth credentials from the request, or throws. - * - *
Returns a wrapper object containing the Base64 decoded username
- * and password from the Authorization header, or null if basic-auth is not properly configured
- */
- BasicAuthCredentials basicAuthCredentials();
-
}
diff --git a/avaje-jex/src/main/java/io/avaje/jex/DJexConfig.java b/avaje-jex/src/main/java/io/avaje/jex/DJexConfig.java
index 68ba543c..f9e3fd5c 100644
--- a/avaje-jex/src/main/java/io/avaje/jex/DJexConfig.java
+++ b/avaje-jex/src/main/java/io/avaje/jex/DJexConfig.java
@@ -73,12 +73,10 @@ public JexConfig renderer(String extension, TemplateRender renderer) {
@Override
public ThreadFactory threadFactory() {
-
if (factory == null) {
factory =
Thread.ofVirtual().name("avaje-jex-http-", 0).factory();
}
-
return factory;
}
@@ -130,7 +128,6 @@ public Map Each {@code HttpFilter} in the chain, invokes the next filter within its own {@link
- * #filter(Context, Chain)} implementation. The final {@code HttpFilter} in the chain invokes the
+ * #filter(Context, FilterChain)} implementation. The final {@code HttpFilter} in the chain invokes the
* applications exchange handler.
*/
@FunctionalInterface
@@ -26,7 +24,7 @@ public interface HttpFilter {
*
*
*