- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.3k
Wrap checked exceptions in painless.DefBootstrap #19706
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
Wrap checked exceptions in painless.DefBootstrap #19706
Conversation
| ❌ Gradle check result for eacd530: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? | 
eacd530    to
    acbf138      
    Compare
  
    | ❌ Gradle check result for acbf138: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? | 
| Waiting on #19703 | 
A behavior change in [JDK-25][1] means that ClassValue.getFromHashMap will now wrap any checked exceptions with `java.lang.Error`. The fix is to wrap checked exceptions in `ClassValue.computeValue` with a specific RuntimeException wrapper, and then unwrap it later when handling. [1]: https://bugs.openjdk.org/browse/JDK-8351996 Signed-off-by: Andrew Ross <[email protected]>
acbf138    to
    cb1790c      
    Compare
  
    | ❌ Gradle check result for cb1790c: null Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? | 
| Codecov Report❌ Patch coverage is  Additional details and impacted files@@             Coverage Diff              @@
##               main   #19706      +/-   ##
============================================
- Coverage     73.16%   73.12%   -0.05%     
+ Complexity    70842    70801      -41     
============================================
  Files          5732     5732              
  Lines        324191   324200       +9     
  Branches      46922    46923       +1     
============================================
- Hits         237186   237060     -126     
- Misses        67841    68014     +173     
+ Partials      19164    19126      -38     ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
 | 
        
          
                modules/lang-painless/src/main/java/org/opensearch/painless/DefBootstrap.java
          
            Show resolved
            Hide resolved
        
      Signed-off-by: Ankit Jain <[email protected]>
| ❌ Gradle check result for 2f96c88: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? | 
| The backport to  To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.19 2.19
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.19
# Create a new branch
git switch --create backport/backport-19706-to-2.19
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 8feb6e14ffbcf75c10eb8f90158fa27299a7b14c
# Push it to GitHub
git push --set-upstream origin backport/backport-19706-to-2.19
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.19Then, create a pull request where the  | 
…19706) A behavior change in [JDK-25][1] means that ClassValue.getFromHashMap will now wrap any checked exceptions with `java.lang.Error`. The fix is to wrap checked exceptions in `ClassValue.computeValue` with a specific RuntimeException wrapper, and then unwrap it later when handling. [1]: https://bugs.openjdk.org/browse/JDK-8351996 Signed-off-by: Andrew Ross <[email protected]> Signed-off-by: Ankit Jain <[email protected]> Co-authored-by: Ankit Jain <[email protected]> (cherry picked from commit 8feb6e1)
A behavior change in JDK-25 means that ClassValue.getFromHashMap will now wrap any checked exceptions with
java.lang.Error. The fix is to wrap checked exceptions inClassValue.computeValuewith a specific RuntimeException wrapper, and then unwrap it later when handling.Related Issues
Prereq for #19698
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.