Skip to content

add helper method for parsing multiline String to DslParams#30

Open
ChongHan wants to merge 4 commits intoLMAX-Exchange:masterfrom
ChongHan:feat/multilinearg
Open

add helper method for parsing multiline String to DslParams#30
ChongHan wants to merge 4 commits intoLMAX-Exchange:masterfrom
ChongHan:feat/multilinearg

Conversation

@ChongHan
Copy link

as title

@swarren12
Copy link
Contributor

I wonder if it would be preferable to use a more explicit name for the new method? I think it's highly unlikely that overloading would cause problems for anyone, but might be better to err on the side of caution.

createMultiline() or similar, just to make it explicit what's going on.

*/
static DslParams create(String multilineArgs, DslArg... arguments)
{
return new DslParamsParser().parse(multilineArgs.split(System.lineSeparator()), arguments);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No tests?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test added; plus fixed a bug

@ChongHan
Copy link
Author

I wonder if it would be preferable to use a more explicit name for the new method? I think it's highly unlikely that overloading would cause problems for anyone, but might be better to err on the side of caution.

createMultiline() or similar, just to make it explicit what's going on.

I'm neutral on this, splitting "arg\n" by line terminator should still safely produce "arg", and it's more code to change if you want to migrate a legacy codebase to use text blocks. Maybe a poll in tfxdev?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants