提交 b33478b4 编写于 作者: S Sam Brannen

Added ? wildcard to suppress warnings.

上级 c50d38ef
......@@ -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, ",");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册