8000 Fix bug in `VisitorSet.toString()` by Laughh · Pull Request #4615 · javaparser/javaparser · GitHub
[go: up one dir, main page]

Skip to content

Conversation

Laughh
Copy link
Contributor
@Laughh Laughh commented Nov 18, 2024

Hi, I haved closed previous PR and open a new one, and the case of no element, one element, and multiple elements is considered, and it's also supplemented with tests.

@Laughh Laughh changed the title Fix bug in VisitorSet.toString Fix bug in VisitorSet.toString() Nov 18, 2024
@Laughh
Copy link
Contributor Author
Laughh commented Nov 18, 2024

BTW, I think that the separator , will be more intuitive than single comma, and the thought of this PR is same as the closed one. In this PR, I use stream to make the code more concise.

return sb.replace(sb.length() - 2, sb.length(), "]").toString();
return innerSet.stream()
.map(facade -> facade.overridden.toString())
.collect(Collectors.joining(", ", "[", "]"));
Copy link
Collaborator

Choose a reason for hiding this comment

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

I can't accept this PR, even though it undoubtedly improves the code, because you're changing the format of the character string returned by this method, which may have an impact on other users. Please only correct the issue you have identified.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I have solved it and the format is the same as before.

Copy link
codecov bot commented Nov 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.119%. Comparing base (76f06dd) to head (91cbbcb).
Report is 7 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##            master     #4615       +/-   ##
=============================================
+ Coverage   58.055%   58.119%   +0.063%     
=============================================
  Files          508       508               
  Lines        29780     29775        -5     
  Branches      5251      5251               
=============================================
+ Hits         17289     17305       +16     
+ Misses       10351     10332       -19     
+ Partials      2140      2138        -2     
Flag Coverage Δ
AlsoSlowTests 58.119% <100.000%> (+0.063%) ⬆️
javaparser-core 58.119% <100.000%> (+0.063%) ⬆️
javaparser-symbol-solver 58.119% <100.000%> (?)
jdk-10 58.072% <100.000%> (?)
jdk-11 58.085% <100.000%> (?)
jdk-12 58.072% <100.000%> (?)
jdk-13 58.085% <100.000%> (?)
jdk-14 58.072% <100.000%> (?)
jdk-15 58.085% <100.000%> (+0.029%) ⬆️
jdk-16 58.085% <100.000%> (?)
jdk-17 58.072% <100.000%> (?)
jdk-18 58.085% <100.000%> (?)
jdk-8 58.088% <100.000%> (?)
jdk-9 58.072% <100.000%> (?)
macos-latest 58.109% <100.000%> (+0.053%) ⬆️
ubuntu-latest 58.095% <100.000%> (?)
windows-latest 58.095% <100.000%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...n/java/com/github/javaparser/utils/VisitorSet.java 70.833% <100.000%> (+8.569%) ⬆️

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 395b113...91cbbcb. Read the comment docs.

@jlerbsc jlerbsc merged commit a5feb7e into javaparser:master Nov 18, 2024
35 checks passed
@jlerbsc jlerbsc added this to the next release milestone Nov 18, 2024
@jlerbsc jlerbsc added the PR: Fixed A PR that offers a fix or correction label Nov 18, 2024
@jlerbsc
Copy link
Collaborator
jlerbsc commented Nov 18, 2024

Thank you for this contribution

@Laughh
Copy link
Contributor Author
Laughh commented Nov 18, 2024

Thank you for this contribution

Thanks for your review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Fixed A PR that offers a fix or correction

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0