Skip to content

Allow join to append to an empty string - #1215

Merged
jknack merged 2 commits into
jknack:masterfrom
wozhenbang2004:fix/1052-join-empty-string
Nov 23, 2026
Merged

jknack merged 2 commits into
jknack:masterfrom
wozhenbang2004:fix/1052-join-empty-string

Conversation

@wozhenbang2004

Copy link
Copy Markdown
Contributor

Fixes #1052.

{{join anchorId jsonPathPiece.snakeCase ""}} currently returns an empty string when anchorId is empty, dropping the next path component.

Let empty CharSequence values reach the existing join logic, including separator and prefix/suffix handling. Other falsy inputs keep their current behavior. Adds regressions for inline, block and subexpression calls, plus an empty StringBuilder.

Validated with mvn clean install -DskipTests, mvn clean package and changed-file Spotless on Linux / JDK 17: 1,206 tests passed, with 3 existing skips. Core Javadoc generation reports the same non-fatal missing-source error as the baseline; documentation generation is not claimed to pass.

@jknack jknack added this to the 4.5.9 milestone Nov 23, 2026
@jknack
jknack merged commit 352c1f6 into jknack:master Nov 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] string join helper should allow joining strings on to empty string

2 participants