* Do not use enum as parameter name as it's a keyword in java 1.5.
This commit is contained in:
parent
524028da3a
commit
43ee46e653
1 changed files with 4 additions and 4 deletions
|
@ -73,13 +73,13 @@ public class StringUtils {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Collect items of a string enumeration into a String array.
|
* Collect items of a string enumeration into a String array.
|
||||||
* @param enum an enumeration of strings
|
* @param en an enumeration of strings
|
||||||
* @return the enumeration values as string array
|
* @return the enumeration values as string array
|
||||||
*/
|
*/
|
||||||
public static String[] collect(Enumeration enum) {
|
public static String[] collect(Enumeration en) {
|
||||||
List list = new ArrayList();
|
List list = new ArrayList();
|
||||||
while (enum.hasMoreElements()) {
|
while (en.hasMoreElements()) {
|
||||||
list.add(enum.nextElement());
|
list.add(en.nextElement());
|
||||||
}
|
}
|
||||||
return (String[]) list.toArray(new String[list.size()]);
|
return (String[]) list.toArray(new String[list.size()]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue