From 771f9f91765cbaaae86b4337358c1f6454b2d870 Mon Sep 17 00:00:00 2001 From: nielserik Date: Wed, 29 Oct 2025 08:33:24 +0100 Subject: [PATCH] Upgrade: Java 21, maven build plug-ins, vertx 4, --- pom.xml | 16 ++++++++-------- .../indexdata/oaipmhviewer/BrowseArchive.java | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index bde981e..2891399 100644 --- a/pom.xml +++ b/pom.xml @@ -14,12 +14,12 @@ io.vertx vertx-core - 3.9.16 + 4.5.22 io.vertx vertx-web - 3.9.16 + 4.5.22 junit @@ -30,29 +30,29 @@ io.vertx vertx-unit - 3.9.16 + 4.5.22 test io.vertx vertx-web-client - 3.9.16 + 4.5.22 maven-compiler-plugin - 3.3 + 3.14.0 - 1.8 - 1.8 + 21 + 21 org.apache.maven.plugins maven-shade-plugin - 2.3 + 3.3.0 package diff --git a/src/main/java/com/indexdata/oaipmhviewer/BrowseArchive.java b/src/main/java/com/indexdata/oaipmhviewer/BrowseArchive.java index cfe0ef4..583048b 100644 --- a/src/main/java/com/indexdata/oaipmhviewer/BrowseArchive.java +++ b/src/main/java/com/indexdata/oaipmhviewer/BrowseArchive.java @@ -3,6 +3,7 @@ import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.StringWriter; +import java.net.URI; import java.net.URL; import java.util.Arrays; @@ -27,7 +28,6 @@ import org.xml.sax.SAXException; import io.vertx.core.AbstractVerticle; -import io.vertx.core.CompositeFuture; import io.vertx.core.Future; import io.vertx.core.Promise; import io.vertx.core.buffer.Buffer; @@ -59,7 +59,7 @@ public void start(Promise promise) { // Handle POSTed FORM data router.route().handler(BodyHandler.create()); - router.route().handler(FaviconHandler.create()); + router.route().handler(FaviconHandler.create(vertx)); router.route("/static/*").handler(StaticHandler.create("static")); router.route().handler(routingContext -> { @@ -77,7 +77,7 @@ public void start(Promise promise) { try { // Allow user to enter URI without protocol, but assume http then. pURL = (inputOaiUrl.matches("https?://.*") ? - new URL(inputOaiUrl) : new URL("http://"+inputOaiUrl)); + new URI(inputOaiUrl).toURL() : new URI("http://"+inputOaiUrl).toURL()); String query; if (Arrays.asList("Identify", @@ -107,7 +107,7 @@ public void start(Promise promise) { String displayOaiResponse = prettyPrintOaiResponse(oaiResponse.body().toString()); Future promisedSets = listSets(pURL); Future promisedFormats = listMetadataFormats(pURL); - CompositeFuture.all(promisedSets, promisedFormats).onComplete( cfar -> { + Future.all(promisedSets, promisedFormats).onComplete( cfar -> { String listSets = cfar.result().resultAt(0).toString(); String listMetadataFormats = cfar.result().resultAt(1).toString(); String page = Page.getHtml(inputOaiUrl,