-
-
Notifications
You must be signed in to change notification settings - Fork 424
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
Use String.join instead of Collectors.joining #3973
Conversation
String.join results in less code when joining an Iterable or Array. Signed-off-by: Wouter Born <github@maindrain.net>
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.
Can you fix the typo?
@@ -48,7 +45,7 @@ public String toValue(final String string, INode node) throws ValueConverterExce | |||
} | |||
} | |||
} | |||
return Arrays.stream(ids).collect(Collectors.joining(SEPERATOR)); | |||
return String.join(SEPERATOR, ids); |
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.
return String.join(SEPERATOR, ids); | |
return String.join(SEPARATOR, ids); |
@@ -65,7 +62,7 @@ public String toString(String value) throws ValueConverterException { | |||
ids[i] = toEscapedString(id); | |||
} | |||
} | |||
return Arrays.stream(ids).collect(Collectors.joining(SEPERATOR)); | |||
return String.join(SEPERATOR, ids); |
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.
return String.join(SEPERATOR, ids); | |
return String.join(SEPARATOR, ids); |
Signed-off-by: Wouter Born <github@maindrain.net>
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.
Thanks!
String.join results in less code when joining an Iterable or Array.