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

Fix two minor issues with the Java language module token extraction #940

Merged
merged 10 commits into from
Feb 24, 2023

Conversation

tsaglam
Copy link
Member

@tsaglam tsaglam commented Feb 17, 2023

This PR fixes three two issues with the token extraction:

  1. Try and try-with-resource were extracted as different tokens
  2. Try-catch-finally blocks did not correctly employ end tokens
  3. Initialization and subsequent declaration of a variable in a single line vs. two line lead to different tokens

EDIT: Removed the last fix, as it affected the false positives enough while not affecting the true-positives significantly

This PR does not affect the E2E tests, as try/catch-blocks are not part of the dataset used there.

@tsaglam tsaglam added bug Issue/PR that involves a bug minor Minor issue/feature/contribution/change language PR / Issue deals (partly) with new and/or existing languages for JPlag labels Feb 17, 2023
@tsaglam tsaglam changed the title Fix three issues with the Java language module token extraction Fix three minor issues with the Java language module token extraction Feb 17, 2023
@tsaglam tsaglam changed the title Fix three minor issues with the Java language module token extraction Fix two minor issues with the Java language module token extraction Feb 20, 2023
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@tsaglam tsaglam marked this pull request as ready for review February 20, 2023 10:33
@tsaglam tsaglam requested a review from a team February 20, 2023 10:33
@tsaglam
Copy link
Member Author

tsaglam commented Feb 20, 2023

@mbrdl @SirYwell just FYI.

@tsaglam tsaglam merged commit 75b94d7 into develop Feb 24, 2023
@tsaglam tsaglam deleted the feature/java-try branch May 16, 2023 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue/PR that involves a bug language PR / Issue deals (partly) with new and/or existing languages for JPlag minor Minor issue/feature/contribution/change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant