Skip to content

Strings#splitStringByCommaToSet vs Strings#splitStringByCommaToArray #27710

@dnhatn

Description

@dnhatn

These two helper methods are expected to have the same behaviour. However, Strings#splitStringByCommaToSet trims the leading and trailing whitespace of the substrings, while Strings#splitStringByCommaToArray reserves them. This subtle difference can lead to unexpected bugs (For example #27708).

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