-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed logic around fallback resolver in URIResolverRegistry #2101
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, good catch. I added one more edge case that we might have missed.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2101 +/- ##
========================================
Coverage 49% 49%
- Complexity 6317 6336 +19
========================================
Files 666 667 +1
Lines 59695 59836 +141
Branches 8670 8692 +22
========================================
+ Hits 29600 29709 +109
- Misses 27863 27873 +10
- Partials 2232 2254 +22 ☔ View full report in Codecov by Sentry. |
var fallBack = fallbackLogicalResolver; | ||
if (fallBack != null) { | ||
return resolveAndFixOffsets(loc == null ? original : loc, fallBack, Collections.emptyList()); | ||
if (loc == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not the right place for this check, it changes the logic of the case where there is no fallbackLogicalResolver
defined.
Fixed a (latent) bug where the result of logical source location resolution would be de facto discarded by the fallback resolver returning
null
. This popped up during evolution of theFallbackResolver
class in therascal-lsp
project.