Skip to content

Commit f830413

Browse files
committed
fix(importers): Fix EmmImporter emmBaseUrl resolving
1 parent d6828be commit f830413

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

importers/src/main/java/whelk/importer/EmmImporter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class EmmImporter {
2626

2727
public EmmImporter(Whelk whelk, String emmBaseUrl, boolean usingQuickCreate) {
2828
this.whelk = whelk;
29-
this.emmBaseUrl = emmBaseUrl;
29+
this.emmBaseUrl = emmBaseUrl.endsWith("/") ? emmBaseUrl : emmBaseUrl + "/";
3030
this.usingQuickCreate = usingQuickCreate;
3131
}
3232

@@ -45,7 +45,7 @@ public void importFromLibrisEmm(String[] types) throws URISyntaxException, IOExc
4545
}
4646

4747
private boolean importStream(HttpClient client, String type) throws URISyntaxException, IOException, InterruptedException {
48-
URI next = new URI(emmBaseUrl).resolve("/full?selection=type:" + type + "&offset=0");
48+
URI next = new URI(emmBaseUrl).resolve("full?selection=type:" + type + "&offset=0");
4949
String dumpTimeStamp = null;
5050
int importCount = 0;
5151
int percentProgress = 0;

0 commit comments

Comments
 (0)