Skip to content

Fix issue #4791#4792

Merged
jlerbsc merged 3 commits intojavaparser:masterfrom
bannmann:fix-4791
Jul 8, 2025
Merged

Fix issue #4791#4792
jlerbsc merged 3 commits intojavaparser:masterfrom
bannmann:fix-4791

Conversation

@bannmann
Copy link
Copy Markdown
Contributor

@bannmann bannmann commented Jul 6, 2025

Fixes #4791.

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.351%. Comparing base (a9886cd) to head (5b97054).
Report is 3 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##              master     #4792   +/-   ##
===========================================
  Coverage     58.351%   58.351%           
  Complexity      2514      2514           
===========================================
  Files            671       671           
  Lines          38782     38782           
  Branches        7041      7041           
===========================================
  Hits           22630     22630           
  Misses         13266     13266           
  Partials        2886      2886           
Flag Coverage Δ
AlsoSlowTests 58.351% <100.000%> (ø)
javaparser-core 58.351% <100.000%> (ø)
javaparser-symbol-solver 58.351% <100.000%> (ø)
jdk-10 57.903% <100.000%> (ø)
jdk-11 57.902% <100.000%> (ø)
jdk-12 57.902% <100.000%> (ø)
jdk-13 57.902% <100.000%> (ø)
jdk-14 58.149% <100.000%> (ø)
jdk-15 58.149% <100.000%> (ø)
jdk-16 58.123% <100.000%> (ø)
jdk-17 58.278% <100.000%> (ø)
jdk-18 58.278% <100.000%> (ø)
jdk-8 57.904% <100.000%> (ø)
jdk-9 57.900% <100.000%> (ø)
macos-latest 58.344% <100.000%> (+0.029%) ⬆️
ubuntu-latest 58.338% <100.000%> (ø)
windows-latest 58.333% <100.000%> (ø)

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

Files with missing lines Coverage Δ
...va/com/github/javaparser/ast/comments/Comment.java 58.928% <100.000%> (ø)
...ub/javaparser/ast/expr/LiteralStringValueExpr.java 55.000% <100.000%> (ø)
...ithub/javaparser/ast/expr/MethodReferenceExpr.java 49.230% <100.000%> (ø)
...main/java/com/github/javaparser/ast/expr/Name.java 65.384% <100.000%> (ø)
...ava/com/github/javaparser/ast/expr/SimpleName.java 100.000% <100.000%> (ø)

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 2789df2...5b97054. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

public Comment setContent(final String content) {
assertNotNull(content);
if (content == this.content) {
if (content.equals(this.content)) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you explain how these classes were modified?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I modified PropertyGenerator.generateSetter() to generate this whenever the property type is String, the code change is included in this PR.

After testing the generation manually in the working copy of my local repo, I copied the PropertyGenerator change to a second, pristine clone and then ran ./run_core_metamodel_generator.sh && ./run_core_generators.sh there.

Later I wrote the unit tests, copied those to the second checkout as well and re-ran the generator scripts.

Finally, I squashed all the changes from the second working copy and pushed the resulting commit.

Let me know if anything's missing, or if you prefer separate commits for any of the steps I took.

@jlerbsc
Copy link
Copy Markdown
Collaborator

jlerbsc commented Jul 7, 2025

Thank you for your contribution. Could you simply separate the commit of the changes you made manually from those generated by the shell.

@bannmann
Copy link
Copy Markdown
Contributor Author

bannmann commented Jul 7, 2025

Sure! Done.

@jlerbsc jlerbsc merged commit 862450e into javaparser:master Jul 8, 2025
35 checks passed
@jlerbsc jlerbsc added this to the next release milestone Jul 8, 2025
@jlerbsc jlerbsc added the PR: Fixed A PR that offers a fix or correction label Jul 8, 2025
@jlerbsc
Copy link
Copy Markdown
Collaborator

jlerbsc commented Jul 8, 2025

Thank you for this contribution.

@bannmann bannmann deleted the fix-4791 branch August 6, 2025 23:22
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.

Strings and Boxed types should be compared using "equals()"

2 participants