Skip to content

Fix for #659 variable lookup confusion#741

Open
opeongo wants to merge 6 commits intomasterfrom
fix_659_again
Open

Fix for #659 variable lookup confusion#741
opeongo wants to merge 6 commits intomasterfrom
fix_659_again

Conversation

@opeongo
Copy link
Contributor

@opeongo opeongo commented Jun 1, 2023

  • Change the way the way that the block namespace cache is implemented. Previously it used an imprecise equals method that led to collisions and occasionally returned null values.

  • Move the namespace swap out of the iterative loop in BSHEnhancedForLoop to avoid unnecessary lookups.

opeongo added 2 commits May 31, 2023 22:48
…d. Previously it used an imprecise equals method that led to collisions and occasionally returned null values.

- Move the namespace swap out of the iterative loop in BSHEnhancedForLoop to avoid unnecessary lookups.
@codecov
Copy link

codecov bot commented Jun 1, 2023

Codecov Report

Attention: Patch coverage is 90.54054% with 7 lines in your changes missing coverage. Please review.

Project coverage is 74.19%. Comparing base (b1998b1) to head (5a3fb21).
Report is 1036 commits behind head on master.

Files Patch % Lines
src/main/java/bsh/BlockNameSpace.java 58.33% 2 Missing and 3 partials ⚠️
src/main/java/bsh/util/ValueReferenceMap.java 96.07% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #741      +/-   ##
============================================
- Coverage     74.24%   74.19%   -0.05%     
+ Complexity     3041     3038       -3     
============================================
  Files           108      108              
  Lines          9354     9313      -41     
  Branches       1857     1862       +5     
============================================
- Hits           6945     6910      -35     
+ Misses         2070     2062       -8     
- Partials        339      341       +2     
Flag Coverage Δ
unittests 74.19% <90.54%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@opeongo
Copy link
Contributor Author

opeongo commented Jan 5, 2024

Can we have some discussion on this or perhaps get it merged?

@jrabun
Copy link

jrabun commented May 23, 2024

Just one anecdotal data point: My application was encountering the same NPE mentioned in this comment. Applying the changes from this branch resolved the issue. Thank you, opeongo, for the time and effort you put into debugging this issue!

@opeongo
Copy link
Contributor Author

opeongo commented Jun 23, 2024

Just one anecdotal data point: My application was encountering the same NPE mentioned in this comment. Applying the changes from this branch resolved the issue. Thank you, opeongo, for the time and effort you put into debugging this issue!

Thanks for the feedback. It is nice to know that someone else is out there.

@nickl-
Copy link
Member

nickl- commented Aug 10, 2024

Will take some time to review this, it seems to be doing more than one thing.

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.

3 participants