Added ? wildcard to suppress warnings.

master
Sam Brannen 14 years ago
parent c50d38ef8d
commit b33478b4ba
  1. 8
      org.springframework.core/src/main/java/org/springframework/util/StringUtils.java

@ -1064,12 +1064,12 @@ public abstract class StringUtils {
* @param suffix the String to end each element with
* @return the delimited String
*/
public static String collectionToDelimitedString(Collection coll, String delim, String prefix, String suffix) {
public static String collectionToDelimitedString(Collection<?> coll, String delim, String prefix, String suffix) {
if (CollectionUtils.isEmpty(coll)) {
return "";
}
StringBuilder sb = new StringBuilder();
Iterator it = coll.iterator();
Iterator<?> it = coll.iterator();
while (it.hasNext()) {
sb.append(prefix).append(it.next()).append(suffix);
if (it.hasNext()) {
@ -1086,7 +1086,7 @@ public abstract class StringUtils {
* @param delim the delimiter to use (probably a ",")
* @return the delimited String
*/
public static String collectionToDelimitedString(Collection coll, String delim) {
public static String collectionToDelimitedString(Collection<?> coll, String delim) {
return collectionToDelimitedString(coll, delim, "", "");
}
@ -1096,7 +1096,7 @@ public abstract class StringUtils {
* @param coll the Collection to display
* @return the delimited String
*/
public static String collectionToCommaDelimitedString(Collection coll) {
public static String collectionToCommaDelimitedString(Collection<?> coll) {
return collectionToDelimitedString(coll, ",");
}

Loading…
Cancel
Save