Skip to content

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

Draft
elharo wants to merge 3 commits into
masterfrom
MCOMPILER-598-textblock-regression-it-4x
Draft

[MCOMPILER-598] Add regression test for text blocks with unescaped quotes#1117
elharo wants to merge 3 commits into
masterfrom
MCOMPILER-598-textblock-regression-it-4x

Conversation

@elharo

@elharo elharo commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Regression test for #875 (MCOMPILER-598).

A source file that contains a text block with an unescaped double quote must compile. The old plexus-java/qdox-based source-module parser (3.x) parsed every source file in the source folder and failed on such text blocks with syntax error @[9,2] / @[23,1]. This branch has no qdox/plexus-java, but the IT locks the behavior so it is not reintroduced.

The IT is intentionally minimal: a single TextBlock class containing the multiline string, and a verify.groovy that asserts the class was compiled. No module-info or service-provider machinery is needed to exercise the bug.

Sanity-checked on master: mvn -Prun-its -Dinvoker.test=MCOMPILER-598 install -> IT passes.

…otes

The old source module parser (plexus-java with qdox) used to parse every
source file in the source folder. 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.
@elharo

elharo commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

Installed distributions
Error: No supported distribution was found for input adopt-openj9

@elharo
elharo marked this pull request as draft August 29, 2026 14:31
The bug is that unescaped double quotes inside a text block break the
source parser. It does not involve modularity or service providers, so
drop the module-info.java, Service interface and ServiceImpl wrapper.
Keep a single TextBlock class with the multiline string and assert only
that this class was compiled.
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