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

[cpd] Fix CPD crashes about unicode escapes #4983

Merged
merged 4 commits into from
May 2, 2024

Conversation

oowekyala
Copy link
Member

Describe the PR

CPD used to crash if an invalid unicode escape was in a file. This was not treated as a (skippable) lexical error even if it should.

Another crash occurred if there was a lexical error and the current position of the token manager is a unicode escape. Then the routine to get the current line/column failed.

Related issues

  • Fixes #

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • Added (in-code) documentation (if needed)

@pmd-test
Copy link

pmd-test commented Apr 29, 2024

1 Message
📖 Compared to master:
This changeset changes 0 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.
Download full report as build artifact
Compared to master:
This changeset changes 0 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.
Download full report as build artifact

Generated by 🚫 Danger

@adangel adangel added this to the 7.2.0 milestone May 2, 2024
@adangel adangel added the a:bug PMD crashes or fails to analyse a file. label May 2, 2024
adangel added a commit that referenced this pull request May 2, 2024
adangel added a commit that referenced this pull request May 2, 2024
Merge pull request #4983 from oowekyala:cpd-fix-crashes
@adangel adangel merged commit d773088 into pmd:master May 2, 2024
3 checks passed
@oowekyala oowekyala deleted the cpd-fix-crashes branch May 2, 2024 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:bug PMD crashes or fails to analyse a file.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants