Skip to content

Add Infrastructure params and Policy params rows in NS description#792

Open
AlexFalessi wants to merge 3 commits intoow2-proactive:NSDescriptionUpdatefrom
AlexFalessi:NSDescriptionUpdate
Open

Add Infrastructure params and Policy params rows in NS description#792
AlexFalessi wants to merge 3 commits intoow2-proactive:NSDescriptionUpdatefrom
AlexFalessi:NSDescriptionUpdate

Conversation

@AlexFalessi
Copy link
Copy Markdown
Member

No description provided.

@activeeon-bot
Copy link
Copy Markdown

Can one of the admins verify this patch?

}

private String[] splitAndExtractNameAndParamsFromDescription(String input) {
String[] elements = input.split(",");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

not ideal, this suppose you have a comma after the infrastructure or policy name.
you should extract the first word of the input instead.
String[] elements = input.split("[,\s]+");

}

private String[] splitAndExtractNameAndParamsFromDescription(String input) {
String[] elements = input.split("[,\\s]+");
Copy link
Copy Markdown
Member

@fviale fviale Aug 22, 2023

Choose a reason for hiding this comment

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

you can make this code much simpler

return input.trim().split("[,\\s]+", 2);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Very nice !

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.

4 participants