Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-core</artifactId>
<version>3.9.16</version>
<version>4.5.22</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-web</artifactId>
<version>3.9.16</version>
<version>4.5.22</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand All @@ -30,29 +30,29 @@
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-unit</artifactId>
<version>3.9.16</version>
<version>4.5.22</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-web-client</artifactId>
<version>3.9.16</version>
<version>4.5.22</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<version>3.14.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>21</source>
<target>21</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/indexdata/oaipmhviewer/BrowseArchive.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand Down Expand Up @@ -59,7 +59,7 @@ public void start(Promise<Void> 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 -> {
Expand All @@ -77,7 +77,7 @@ public void start(Promise<Void> 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",
Expand Down Expand Up @@ -107,7 +107,7 @@ public void start(Promise<Void> promise) {
String displayOaiResponse = prettyPrintOaiResponse(oaiResponse.body().toString());
Future<String> promisedSets = listSets(pURL);
Future<String> 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,
Expand Down