GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |
GeezerVison is showing github.com — [java] UnnecessaryImport: Fix StackOverflowError for very long Javadoc references by adangel · Pull Request #7396 · pmd/pmd Conversation
Member
Describe the PRThe Javadoc reference regexes in Related issues
Ready?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…c references The Javadoc reference regexes in `UnnecessaryImportRule` used a repeated group for dotted names. `java.util.regex` handles such groups recursively, so a comment with thousands of `a.a.a.` segments (about 4 KB) caused a `StackOverflowError`, which aborts the analysis unless error recovery mode is on. The pattern now uses possessive quantifiers, so matching is iterative and linear in the input size.
|
There was an error while loading. Please reload this page.
|
Compared to main: (comment created at 2026-11-26 21:10:09+00:00 for 2d45b37) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Regression tests for GHSA-p8c4-pmh9-36vf: - UnnecessaryImportTest: run the rule via executeRule instead of calling visitComments directly (which is private again), use a much longer input and assert that imports used inside/after the long reference are not reported. - AvoidUsingHardCodedIPTest, VfUnescapeElTest, AssertionUtilTest: new tests with very long inputs for the other fixed patterns. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.