Skip to content

Always cache undef along these paths#8821

Merged
headius merged 1 commit intojruby:masterfrom
headius:always_cache_undef
Apr 30, 2025
Merged

Always cache undef along these paths#8821
headius merged 1 commit intojruby:masterfrom
headius:always_cache_undef

Conversation

@headius
Copy link
Copy Markdown
Member

@headius headius commented Apr 30, 2025

All of these paths always passed true to cache any "undef" result, to avoid re-searching when we know nothing is there. This commit unifies all those paths and avoids a non-caching path altogether, which laterally fixes the potential (but never observed) NPE that was reported in #8805.

This could be an alternate fix for #8805 but I wanted to get more eyes on it.

@headius headius added this to the JRuby 9.4.13.0 milestone Apr 30, 2025
@headius headius changed the base branch from jruby-9.4 to master April 30, 2025 16:36
@headius headius force-pushed the always_cache_undef branch from a7dea6e to 645367a Compare April 30, 2025 16:44
All of these paths always passed true to cache any "undef" result,
to avoid re-searching when we know nothing is there. This commit
unifies all those paths and avoids a non-caching path altogether,
which laterally fixes the potential (but never observed) NPE that
was reported in jruby#8805.
@headius headius force-pushed the always_cache_undef branch from 645367a to 16a5680 Compare April 30, 2025 17:19
@headius headius merged commit 72a2685 into jruby:master Apr 30, 2025
@headius headius deleted the always_cache_undef branch April 30, 2025 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant