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
@@ -59,7 +59,7 @@ public class TreasureChest {
|
||||
* Get all items
|
||||
*/
|
||||
public List<Item> getItems() {
|
||||
ArrayList<Item> list = new ArrayList<>();
|
||||
List<Item> list = new ArrayList<>();
|
||||
list.addAll(items);
|
||||
return list;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user