Skip to content

Fix: issue 4747 Lexical preserving fails after replacing MarkerAnnotationExpr name#4748

Merged
jlerbsc merged 3 commits into
javaparser:masterfrom
jlerbsc:master
May 6, 2025
Merged

Fix: issue 4747 Lexical preserving fails after replacing MarkerAnnotationExpr name#4748
jlerbsc merged 3 commits into
javaparser:masterfrom
jlerbsc:master

Conversation

@jlerbsc

@jlerbsc jlerbsc commented May 6, 2025

Copy link
Copy Markdown
Collaborator

Fixes #4747 .

This happens because changing a name results in the creation of a token when the syntax of the modified node is evaluated, whereas parsing an annotation results in a representation containing a child node (representing the annotation name). When the annotation name is modified, the element to be deleted (the child node) is compared with the token containing the character string representing the new annotation name.

@codecov

codecov Bot commented May 6, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 58.324%. Comparing base (e8fa78f) to head (0798575).
Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
...parser/printer/lexicalpreservation/Difference.java 66.666% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##              master     #4748       +/-   ##
===============================================
+ Coverage     58.287%   58.324%   +0.036%     
  Complexity      2509      2509               
===============================================
  Files            671       671               
  Lines          38761     38764        +3     
  Branches        7033      7034        +1     
===============================================
+ Hits           22593     22609       +16     
+ Misses         13276     13264       -12     
+ Partials        2892      2891        -1     
Flag Coverage Δ
AlsoSlowTests 58.324% <66.666%> (+0.036%) ⬆️
javaparser-core 58.324% <66.666%> (+0.036%) ⬆️
javaparser-symbol-solver 58.324% <66.666%> (+0.036%) ⬆️
jdk-10 57.875% <66.666%> (+0.036%) ⬆️
jdk-11 57.874% <66.666%> (+0.036%) ⬆️
jdk-12 57.874% <66.666%> (+0.036%) ⬆️
jdk-13 57.874% <66.666%> (+0.036%) ⬆️
jdk-14 58.122% <66.666%> (+0.036%) ⬆️
jdk-15 58.122% <66.666%> (+0.036%) ⬆️
jdk-16 58.096% <66.666%> (+0.036%) ⬆️
jdk-17 58.251% <66.666%> (+0.036%) ⬆️
jdk-18 58.251% <66.666%> (+0.036%) ⬆️
jdk-8 57.876% <66.666%> (+0.036%) ⬆️
jdk-9 57.873% <66.666%> (+0.036%) ⬆️
macos-latest 58.317% <66.666%> (+0.036%) ⬆️
ubuntu-latest 58.311% <66.666%> (+0.036%) ⬆️
windows-latest 58.306% <66.666%> (+0.036%) ⬆️

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

Files with missing lines Coverage Δ
...parser/printer/lexicalpreservation/Difference.java 77.956% <66.666%> (+0.119%) ⬆️

... and 2 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 7a27a41...0798575. Read the comment docs.

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

@jlerbsc jlerbsc merged commit 32c7997 into javaparser:master May 6, 2025
35 checks passed
@jlerbsc jlerbsc added this to the next release milestone May 6, 2025
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.

Lexical preserving fails after replacing MarkerAnnotationExpr name

1 participant