Skip to content
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

Use correct start indices in ModulePositionScanner #3207

Merged
merged 4 commits into from
Nov 13, 2023
Merged

Use correct start indices in ModulePositionScanner #3207

merged 4 commits into from
Nov 13, 2023

Conversation

fthomas
Copy link
Member

@fthomas fthomas commented Nov 11, 2023

ModulePositionScanner currently reports wrong substring positions if an artifactId is a proper substring of a groupId. With this change, regex capturing groups are used to get the correct start indices of substring positions of ModulePositions.

Closes #3206

`ModulePositionScanner` currently reports wrong substring positions if
an an artifactId is a proper substring of a groupId. With this change,
regex capturing groups are used to get the correct start indices of
substring positions of `ModulePositions`.
@fthomas fthomas added bug Something isn't working cat:rewrite labels Nov 11, 2023
@fthomas fthomas added this to the 0.27.0 milestone Nov 11, 2023
Copy link

codecov bot commented Nov 11, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (290eabd) 91.07% compared to head (fd95247) 91.07%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3207   +/-   ##
=======================================
  Coverage   91.07%   91.07%           
=======================================
  Files         163      163           
  Lines        3406     3406           
  Branches      284      287    +3     
=======================================
  Hits         3102     3102           
  Misses        304      304           
Files Coverage Δ
...eward/core/edit/update/ModulePositionScanner.scala 100.00% <100.00%> (ø)

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

Copy link
Contributor

@daddykotex daddykotex left a comment

Choose a reason for hiding this comment

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

Thanks for this
I found the issue and the PR after hitting this

@fthomas fthomas merged commit 6ab25ce into main Nov 13, 2023
10 checks passed
@fthomas fthomas deleted the fix/3206 branch November 13, 2023 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cat:rewrite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StringIndexOutOfBoundsException thrown when trying to perform Substring.Replacement
3 participants