Skip to content

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

Merged
elharo merged 3 commits into
masterfrom
MCOMPILER-598-textblock-regression-it-4x
Sep 3, 2026
Merged

[MCOMPILER-598] Add regression test for text blocks with unescaped quotes#1117
elharo merged 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).

fixes #875

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.
@elharo
elharo marked this pull request as ready for review August 30, 2026 10:48

@slawekjaranowski slawekjaranowski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be also added to 3.x branch

@elharo
elharo merged commit 81e7424 into master Sep 3, 2026
20 checks passed
@elharo
elharo deleted the MCOMPILER-598-textblock-regression-it-4x branch September 3, 2026 17:53
@github-actions github-actions Bot added this to the 4.0.0-beta-6 milestone Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

@elharo Please assign appropriate label to PR according to the type of change.

@elharo elharo added the skip-changelog Skip this PR from automatically changelog generation label Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Skip this PR from automatically changelog generation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MCOMPILER-598] Syntax error in qdox parser for unescaped quotes inside textblock of a service provider class

2 participants