From e7de6c6ebc705118c5d46fa056fb06ad127e3da2 Mon Sep 17 00:00:00 2001 From: Xavi Aracil Date: Thu, 15 Dec 2022 13:33:41 +0100 Subject: [PATCH] Added message about redirection --- .../org/oneedtech/inspect/vc/util/CachingDocumentLoader.java | 1 + 1 file changed, 1 insertion(+) diff --git a/inspector-vc/src/main/java/org/oneedtech/inspect/vc/util/CachingDocumentLoader.java b/inspector-vc/src/main/java/org/oneedtech/inspect/vc/util/CachingDocumentLoader.java index 8b55b7d..a4ba642 100644 --- a/inspector-vc/src/main/java/org/oneedtech/inspect/vc/util/CachingDocumentLoader.java +++ b/inspector-vc/src/main/java/org/oneedtech/inspect/vc/util/CachingDocumentLoader.java @@ -135,6 +135,7 @@ public class CachingDocumentLoader extends ConfigurableDocumentLoader { .initialCapacity(32).maximumSize(64).expireAfterAccess(Duration.ofHours(24)) .build(new CacheLoader, Document>() { public Document load(final Tuple id) throws Exception { + // TODO: this loading will fail if the document is redirected (HTTP 301) try (InputStream is = bundled.containsKey(id.t1) ? bundled.get(id.t1).openStream() : new URI(id.t1).toURL().openStream();) {