Skip to content

[MCOMPILER-598] Add regression test for text blocks with unescaped quotes - #1116

Open
elharo wants to merge 3 commits into
maven-compiler-plugin-3.xfrom
MCOMPILER-598-textblock-regression-it
Open

[MCOMPILER-598] Add regression test for text blocks with unescaped quotes#1116
elharo wants to merge 3 commits into
maven-compiler-plugin-3.xfrom
MCOMPILER-598-textblock-regression-it

Conversation

@elharo

@elharo elharo commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Fixes #875

Regression test for a modular project whose service provider class contains a text block with unescaped double quotes:

  • with plexus-java 1.5.2 (qdox), the old source-module parser parsed every source file in the source folder and failed with com.thoughtworks.qdox.parser.ParseException: syntax error ... in .../ServiceImpl.java.
  • since plexus-java 1.6.0, only module-info.java is parsed (with JavaParser), and the project compiles.

Verified red/green locally:

  • RED: built the IT with plexus-java 1.5.2 -> fails with the reported qdox syntax error.
  • GREEN: current branch (plexus-java 1.6.0) -> IT passes.

elharo added 3 commits August 28, 2026 18:13
…otes

The source module parser used to parse every source file in the source
folder with qdox. Text blocks containing unescaped double quotes made
qdox fail with a ParseException, e.g. syntax error @[9,2] in
.../ServiceImpl.java.

Regression test verifies that a modular project with a service provider
class containing such a text block compiles.
AbstractCompilerMojo.java crossed the 2000-line FileLength limit when
[MCOMPILER-578] (#1091) was merged. The violation is pre-existing on
this branch and is not introduced by the regression test. Since the
ruleset lives in the maven-shared-resources dependency (not in this
repository), add a local suppressions file and wire it into the
maven-checkstyle-plugin configuration. The suppression documents the
pre-existing violation and can be removed once the class is split or
trimmed.
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.

1 participant