Skip to content

Commit

Permalink
Improved handling of an edge case around the fallback resolver.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodinaarssen committed Dec 18, 2024
1 parent 9e1edde commit 5a64534
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/org/rascalmpl/uri/URIResolverRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -402,11 +402,9 @@ private ISourceLocation physicalLocation(ISourceLocation loc) throws IOException
ILogicalSourceLocationResolver resolver = map.get(auth);
loc = resolveAndFixOffsets(loc, resolver, map.values());
}
if (loc == null) {
loc = original;
}

if (fallbackLogicalResolver != null) {
var fallbackResult = resolveAndFixOffsets(loc, fallbackLogicalResolver, Collections.emptyList());
var fallbackResult = resolveAndFixOffsets(loc == null ? original : loc, fallbackLogicalResolver, Collections.emptyList());
return fallbackResult == null ? loc : fallbackResult;
}
return loc;
Expand Down

0 comments on commit 5a64534

Please sign in to comment.