From 65da5018f68ffed978056a2cde75a3981dacaad5 Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Wed, 17 Jun 2026 16:49:21 +0200 Subject: [PATCH] Only return external output resolver if the input resolver also goes to the external --- src/org/rascalmpl/uri/URIResolverRegistry.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/org/rascalmpl/uri/URIResolverRegistry.java b/src/org/rascalmpl/uri/URIResolverRegistry.java index ed7943766e..74ed2be442 100644 --- a/src/org/rascalmpl/uri/URIResolverRegistry.java +++ b/src/org/rascalmpl/uri/URIResolverRegistry.java @@ -506,7 +506,11 @@ private ISourceLocationOutput getOutputResolver(String scheme) { return result; } } - if (externalRegistry != null && externalRegistry.supportsOutput(scheme)) { + // only return an external registry if the input is also going to an external resolver + // as input resolvers are quite common, but output less, and we don't want all of them + // to always go via the external registries (just to receive an exception) + var inputResolver = getInputResolver(scheme); + if (externalRegistry != null && externalRegistry.supportsOutput(scheme) && inputResolver == externalRegistry) { return externalRegistry; } }