-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Infrastructure params and Policy params rows in NS description #792
base: NSDescriptionUpdate
Are you sure you want to change the base?
Add Infrastructure params and Policy params rows in NS description #792
Conversation
Can one of the admins verify this patch? |
@@ -451,4 +471,11 @@ public void hostSelected(Host h) { | |||
this.selNS = null; | |||
this.selNode = null; | |||
} | |||
|
|||
private String[] splitAndExtractNameAndParamsFromDescription(String input) { | |||
String[] elements = input.split(","); |
There was a problem hiding this comment.
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]+");
@@ -451,4 +471,21 @@ public void hostSelected(Host h) { | |||
this.selNS = null; | |||
this.selNode = null; | |||
} | |||
|
|||
private String[] splitAndExtractNameAndParamsFromDescription(String input) { | |||
String[] elements = input.split("[,\\s]+"); |
There was a problem hiding this comment.
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);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice !
No description provided.