Skip to content

Try to avoid "flag arguments" #10

@leonardofl

Description

@leonardofl

According to the Clean Code book this is ugly (very hard to read):

String actual = StringSplit.newSplit(3, true).split(DATA);

Maybe you could do:

String actual = StringSplit.newSplit(3).trimmed(true).split(DATA);

Off course, this can complicate your StringArraySplitterBuilder. So I'm not sure how it's feasible.

By the way, I would suggest to use trimmed=true as default. It seems most of the user will prefer this.

Metadata

Metadata

Assignees

Labels

doingWorking on taskenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions