[java-support] branch maint-7 updated: Genericize list-to-string method.
Scott Cantor
cantor.2 at osu.edu
Mon Aug 13 09:34:30 EDT 2018
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch maint-7
in repository java-support.
View the commit online:
http://git.shibboleth.net/view/?p=java-support.git;a=commit;h=6da9504d7d021b47827f1685bcdd6f2f1d378763
The following commit(s) were added to refs/heads/maint-7 by this push:
new 6da9504 Genericize list-to-string method.
6da9504 is described below
commit 6da9504d7d021b47827f1685bcdd6f2f1d378763
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Aug 13 09:34:27 2018 -0400
Genericize list-to-string method.
---
.../utilities/java/support/primitive/StringSupport.java | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/main/java/net/shibboleth/utilities/java/support/primitive/StringSupport.java b/src/main/java/net/shibboleth/utilities/java/support/primitive/StringSupport.java
index 2724ec5..e6de6e4 100644
--- a/src/main/java/net/shibboleth/utilities/java/support/primitive/StringSupport.java
+++ b/src/main/java/net/shibboleth/utilities/java/support/primitive/StringSupport.java
@@ -77,20 +77,19 @@ public final class StringSupport {
}
/**
- * Converts a List of strings into a single string, with values separated by a specified delimiter.
+ * Converts a List of objects into a single string, with values separated by a specified delimiter.
*
- * @param values list of strings
+ * @param values list of objects
* @param delimiter the delimiter used between values
*
* @return delimited string of values
*/
- @Nonnull public static String
- listToStringValue(@Nonnull final List<String> values, @Nonnull final String delimiter) {
+ @Nonnull public static String listToStringValue(@Nonnull final List<?> values, @Nonnull final String delimiter) {
Constraint.isNotNull(values, "List of values can not be null");
Constraint.isNotNull(delimiter, "String delimiter may not be null");
final StringBuilder stringValue = new StringBuilder();
- final Iterator<String> valueItr = values.iterator();
+ final Iterator<?> valueItr = values.iterator();
while (valueItr.hasNext()) {
stringValue.append(valueItr.next());
if (valueItr.hasNext()) {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list