Skip to content

MapSplitter should ignore key-value separator after first #1900

Open
@cgdecker

Description

@cgdecker

Discussion here: https://groups.google.com/d/topic/guava-discuss/FuyKu3oF_PQ/discussion

Basically, after encountering the first key-value separator, it may be reasonable to just include any other separators that appear before the next entry separator in the value rather than throwing IllegalArgumentException as we do now.

Example:

MapSplitter splitter = Splitter.on(";").withKeyValueSeparator("=");

splitter.split("key=value;key2=value"); // normal
splitter.split("key=value;key2=value="); // currently throws IAE
// proposed change would make the second entry split to "key2" -> "value=" instead

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions