Skip to content

GROOVY-11654: Create AGM#putAt variants#2214

Merged
paulk-asert merged 1 commit into
apache:masterfrom
paulk-asert:groovy11654
May 7, 2025
Merged

GROOVY-11654: Create AGM#putAt variants#2214
paulk-asert merged 1 commit into
apache:masterfrom
paulk-asert:groovy11654

Conversation

@paulk-asert
Copy link
Copy Markdown
Contributor

No description provided.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 6, 2025

Codecov Report

❌ Patch coverage is 88.88889% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.0036%. Comparing base (f1b3f72) to head (c954185).
⚠️ Report is 502 commits behind head on master.

Files with missing lines Patch % Lines
...rg/codehaus/groovy/runtime/ArrayGroovyMethods.java 88.8889% 0 Missing and 9 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##               master      #2214        +/-   ##
==================================================
+ Coverage     68.9851%   69.0036%   +0.0185%     
- Complexity      29623      29654        +31     
==================================================
  Files            1423       1423                
  Lines          114216     114297        +81     
  Branches        19810      19828        +18     
==================================================
+ Hits            78792      78869        +77     
+ Misses          28803      28800         -3     
- Partials         6621       6628         +7     
Files with missing lines Coverage Δ
...rg/codehaus/groovy/runtime/ArrayGroovyMethods.java 89.1892% <88.8889%> (-0.0157%) ⬇️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@daniellansun
Copy link
Copy Markdown
Contributor

+1

@daniellansun daniellansun requested a review from Copilot May 6, 2025 13:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a set of overloaded putAt methods to ArrayGroovyMethods to enable subscript-based assignment for arrays of various types, including generic arrays and primitive arrays. Key changes include:

  • Introduction of putAt overloads for generic arrays, handling both array and Iterable sources.
  • New putAt overloads for boolean, byte, char, short, int, long, float, and double arrays that use either array copying or iteration.
  • Consistent handling of insufficient source elements by using default values or throwing IndexOutOfBoundsException as documented.

Comment thread src/main/java/org/codehaus/groovy/runtime/ArrayGroovyMethods.java
@paulk-asert paulk-asert merged commit 3e441b5 into apache:master May 7, 2025
21 checks passed
@paulk-asert paulk-asert deleted the groovy11654 branch May 7, 2025 22:17
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.

4 participants