[java-support] 01/04: Genericize list-to-string method.
Ian Young
ian at iay.org.uk
Fri Aug 24 06:18:31 EDT 2018
This is an automated email from the git hooks/post-receive script.
iay pushed a commit to branch master
in repository java-support.
View the commit online:
http://git.shibboleth.net/view/?p=java-support.git;a=commit;h=83c2744d3da1f0c2cce41e17c5553371a9fba2a1
commit 83c2744d3da1f0c2cce41e17c5553371a9fba2a1
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