Skip to content

[apex] Add rule test for UnusedMethod#4610

Merged
adangel merged 3 commits into
pmd:masterfrom
adangel:issue-4453-apex-link-arrayoutofbounds
Sep 28, 2023
Merged

[apex] Add rule test for UnusedMethod#4610
adangel merged 3 commits into
pmd:masterfrom
adangel:issue-4453-apex-link-arrayoutofbounds

Conversation

@adangel

@adangel adangel commented Jun 29, 2023

Copy link
Copy Markdown
Member

Describe the PR

  • This adds a unit test to verify the rule UnusedMethod actually works.
  • This is important, as that actually tests the integration with apexlink

I could now confirm, that #4453 is indeed fixed by the update of apexlink (#4528) - since apexlink now hardcoded uses always UTF-8 - for both itself and when creating a antlr char stream (see https://github.com/nawforce/apex-link/blob/7688adcb7a2d7f8aa28d0618ffb2a3aa81151858/pkgforce/jvm/src/main/scala/com/nawforce/runtime/parsers/SourceData.scala#L55-L59 )

I couldn't create a unit test to reproduce #4453, since that would have involved changed the default charset in java in a running vm which is not possible.

But I manually verified, that #4453 is now fixed.

Related issues

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)

@ghost

ghost commented Jun 29, 2023

Copy link
Copy Markdown
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, 23 errors and 7 configuration errors.
Full report

Generated by 🚫 Danger

@adangel adangel merged commit abbee4b into pmd:master Sep 28, 2023
@adangel adangel deleted the issue-4453-apex-link-arrayoutofbounds branch September 28, 2023 10:01
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.

[apex] [7.0-rc1] Exception while initializing Apexlink (Index 34812 out of bounds for length 34812)

1 participant