quarkusio/quarkus · error · IllegalStateException
Unable to find source block delimiter for property ${propert
Error message
Unable to find source block delimiter for property ${propertyPath} at line ${lineNumber} What it means
AsciidocFormatter.rewriteAnchors post-processes descriptions that embed source blocks; when it expects the [source,...] delimiter line it instead finds a non-blank, non-delimiter line and throws IllegalStateException naming the property and line number. It guards the formatter's assumption about generated asciidoc structure.
Source
Thrown at devtools/config-doc-maven-plugin/src/main/java/io/quarkus/maven/config/doc/generator/AsciidocFormatter.java:104
StringBuilder rewrittenGuide = new StringBuilder();
StringBuilder currentBuffer = new StringBuilder();
boolean inSourceBlock = false;
boolean findDelimiter = false;
String currentSourceBlockDelimiter = "----";
int lineNumber = 0;
for (String line : lines) {
lineNumber++;
if (inSourceBlock) {
if (findDelimiter) {
rewrittenGuide.append(line + "\n");
if (line.isBlank() || line.startsWith(".")) {
continue;
}
if (!line.startsWith(SOURCE_BLOCK_DELIMITER)) {
throw new IllegalStateException("Unable to find source block delimiter for property "
+ propertyPath + " at line " + lineNumber);
}
currentSourceBlockDelimiter = line.stripTrailing();
findDelimiter = false;
continue;
}
if (line.stripTrailing().equals(currentSourceBlockDelimiter)) {
inSourceBlock = false;
}
rewrittenGuide.append(line + "\n");
continue;
}
if (line.startsWith(SOURCE_BLOCK_PREFIX)) {
inSourceBlock = true;
findDelimiter = true;
if (currentBuffer.length() > 0) {View on GitHub (pinned to e1c734241f)
Solutions
- Fix the description/javadoc of the reported propertyPath so any source block starts with the proper [source,...] delimiter line
- Compare with a working config item's description formatting and mirror its structure
- Report/upgrade if the plugin's formatter changed format expectations between versions
Example fix
// before (javadoc of the property) Some code: HttpServer http = ...; // after Some code: [source,java] HttpServer http = ...;
Defensive patterns
Strategy: validation
Validate before calling
// Pre-check: every description with a source block must declare the delimiter
if (description.contains("[source") && !description.contains("[source,")) {
throw new IllegalStateException("Malformed source block in: " + propertyPath);
} Try / catch
try {
mojo.execute();
} catch (IllegalStateException e) {
if (e.getMessage().startsWith("Unable to find source block delimiter")) {
// parse propertyPath/lineNumber from message and fix that javadoc
}
} Prevention
- Follow the exact asciidoc source-block syntax in config javadoc
- Avoid hand-editing generated descriptions
- Test doc generation after changing javadoc formatting conventions
When it happens
Trigger: formatDescription processes a property whose javadoc/description contains a partial or malformed source block: content appears after the opening marker without the expected delimiter, or the description text was hand-edited into an unexpected shape.
Common situations: Custom javadoc in a config item includes asciidoc source syntax the formatter cannot parse; a template/format change altered line structure; trailing '.' lines interrupted the expected layout.
Related errors
- Conversion from Markdown to Asciidoc is not supported
- One or more errors happened during the configuration documen
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/a8e15d6f9283c382.
Report an issue: GitHub.