WI-19483 Internal Webserver: Necessary to restart PhpStorm to change PHP interpreter

This commit is contained in:
Vladimir Krivosheev
2013-08-02 19:09:07 +02:00
parent 7295d4a274
commit 24b76168dc
@@ -2036,4 +2036,17 @@ public class ContainerUtil extends ContainerUtilRt {
public static <T> Collection<T> toCollection(@NotNull Iterable<T> iterable) {
return iterable instanceof Collection ? (Collection<T>)iterable : newArrayList(iterable);
}
@NotNull
public static <T> List<T> toList(@NotNull Enumeration<T> enumeration) {
if (!enumeration.hasMoreElements()) {
return Collections.emptyList();
}
List<T> result = new SmartList<T>();
while (enumeration.hasMoreElements()) {
result.add(enumeration.nextElement());
}
return result;
}
}