Skip to content

FileSystem source joins multiline file content into a single line #1390

@phateffect

Description

@phateffect

The FileSystemConfigSource reads file content line by line and then concatenates them,
which results in multiline content being converted into a single line.

This behavior can lead to issues when the configuration value is intended to span multiple lines.

For example, a file named foo.key with the following content:

line1
line2

will be read as line 1 line 2 instead of preserving the newline characters.

Is there a specific reason for this behavior? It seems that concatenating the lines at this point may not be the intended functionality, as it can cause unexpected behavior with multiline configuration values.

https://github.com/smallrye/smallrye-config/blob/main/sources/file-system/src/main/java/io/smallrye/config/source/file/FileSystemConfigSource.java#L100

Any clarification on this would be appreciated. Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions