Open opeongo opened 1 year ago
Some of the Lift findings in this PR can be automatically fixed. You can download and apply these changes in your local project directory of your branch to review the suggestions before committing.[^1]
# Download the patch
curl https://lift.sonatype.com/api/patch/github.com/beanshell/beanshell/732.diff -o lift-autofixes.diff
# Apply the patch with git
git apply lift-autofixes.diff
# Review the changes
git diff
Want it all in a single command? Open a terminal in your project's directory and copy and paste the following command:
curl https://lift.sonatype.com/api/patch/github.com/beanshell/beanshell/732.diff | git apply
Once you're satisfied, commit and push your changes in your project. [^1]: You can preview the patch by opening the patch URL in the browser.
Attention: 652 lines
in your changes are missing coverage. Please review.
Comparison is base (
b1998b1
) 74.24% compared to head (c59c722
) 74.35%. Report is 1026 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I took another look and was able to fix the remaining issues, the fix just had to gestate. By the way new {{false}, true};
was explicitly test and checking the for an error, and my fix changed the error message (I think it made it better). Changing the expected error message fixed that part.
This PR should be ready to merge.
Hopefully this can be merged
Hopefully this can be merged
Been a while, will need to pick up again to see where we are at.
This is only a partial fix because each change uncovered another subtle issue. Still work to be done. I am posting this PR so that someone else who has a better idea of how this is supposed to work can at least see some of the issues that I found.
Fixing the issue for proper matching of the most specific method broke several other code paths that depended on the loose behaviour of the
Types.castObject
method. Other issues that popped up that I also fixed included:Types.castObject
, wasn't a problem before)Unfortunately as I made changes more issues started to crop up and I just ran out of time. For example
new {{false}, true};
no longer compiles and executes correctly. This looks to me like it shouldn't work anyway, because it is not a proper 2D array.entries = {{new Entry {"k"=3, "l"=5}, {6}}};
should get typed asObject[][][]
but now is getting typed as 'MapEntry[][][]` and this fails. I suspect that I might have been going down the wrong track with some of my changes. Perhaps there is a simpler way to fix the original problem that does not cause so much other collateral damage.