Skip to content

Add an encoding parameter to the read and write goals - #186

Merged
slachiewicz merged 1 commit into
masterfrom
agent/property-file-encoding
Nov 9, 2026
Merged

slachiewicz merged 1 commit into
masterfrom
agent/property-file-encoding

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

Adds an optional encoding parameter to read-project-properties, write-project-properties and write-active-profile-properties, passed to PropertiesManager through new Charset overloads of load and save. When unset, nothing changes: .properties files stay ISO-8859-1 and YAML files keep SnakeYAML's own detection, which is why the parameter has no defaultValue. An unknown name fails before the output file is opened.

The parameter and its validation follow the shape of #93 by @pbarnes-tibco, which has conflicted since the managers were introduced; the code is rewritten against the current classes.

Closes #92

Verified: mvn verify -Prun-its -Dinvoker.test=encoding,read-project,write-project → 40 unit tests, 3 ITs passed

Without it the goals only handle ISO-8859-1 properties files. The default is unchanged: with no encoding set the managers keep their previous behavior, which includes YAML detection by SnakeYAML.
@slachiewicz slachiewicz added the enhancement New feature or request label Nov 8, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review November 9, 2026 08:06
@slachiewicz
slachiewicz merged commit 4a349b3 into master Nov 9, 2026
15 checks passed
@slachiewicz
slachiewicz deleted the agent/property-file-encoding branch November 9, 2026 08:07
@github-actions github-actions Bot added this to the next-release milestone Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support configurable property file encoding

1 participant