Skip to content

Don't increment value outside of range when merging files #1904

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

Merged
merged 3 commits into from
Feb 16, 2022
Merged

Don't increment value outside of range when merging files #1904

merged 3 commits into from
Feb 16, 2022

Conversation

srz-zumix
Copy link
Contributor

@srz-zumix srz-zumix commented Feb 15, 2022

fix #1832: java.lang.IndexOutOfBoundsException: OverrideMergeStrategy.merge

Fixed an issue where i was increment without being found in the first loop, and was remove with an incorrect index if found in subsequent loops.

Your checklist for this pull request

🚨 Please review the guidelines for contributing to this repository.

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side) and not your master branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or in Jenkins JIRA
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Did you provide a test-case? That demonstrates feature works or fixes the issue.

@srz-zumix srz-zumix requested a review from a team as a code owner February 15, 2022 21:54
Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

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

can you add a test to cover this?

@codecov
Copy link

codecov bot commented Feb 16, 2022

Codecov Report

Merging #1904 (77096fe) into master (a057792) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master    #1904      +/-   ##
============================================
+ Coverage     80.78%   80.81%   +0.03%     
- Complexity      838      839       +1     
============================================
  Files            71       71              
  Lines          2467     2471       +4     
  Branches        346      347       +1     
============================================
+ Hits           1993     1997       +4     
  Misses          366      366              
  Partials        108      108              
Impacted Files Coverage Δ
...nkins/plugins/casc/yaml/OverrideMergeStrategy.java 90.00% <100.00%> (+1.11%) ⬆️

@timja timja added the bug label Feb 16, 2022
@timja timja changed the title fix #1832: java.lang.IndexOutOfBoundsException: OverrideMergeStrategy.merge Don't increment value outside of range when merging files Feb 16, 2022
@timja timja merged commit 64b632c into jenkinsci:master Feb 16, 2022
@srz-zumix srz-zumix deleted the fix/OverrideMergeStrategy_IndexOutOfBoundsException branch February 16, 2022 12:19
@jonesbusy
Copy link
Contributor

Amazing! Hope to have a release soon. Thanks!

@timja
Copy link
Member

timja commented Feb 23, 2022

Oh sorry I forgot this repo needed to be manually triggered, I've hit the button, should be out soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

java.lang.IndexOutOfBoundsException: OverrideMergeStrategy.merge
3 participants