mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-12 16:15:23 +00:00
squid:S1319 - Declarations should use Java collection interfaces such as List rather than specific implementation classes such as LinkedList
This commit is contained in:
1 parent
c580b61df3
commit
e4c34b1e22
11 files changed
+23
-15
No files matched your search
+1
-1
@@ -101,7 +101,7 @@ public interface FluentIterable<E> extends Iterable<E> {
|
||||
* @return a list with all objects of the given iterator
|
||||
*/
|
||||
static <E> List<E> copyToList(Iterable<E> iterable) {
|
||||
ArrayList<E> copy = new ArrayList<>();
|
||||
List<E> copy = new ArrayList<>();
|
||||
Iterator<E> iterator = iterable.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
copy.add(iterator.next());
|
||||
|
||||
Reference in new issue
Block a user