mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-13 08:15:38 +00:00
refactor: use simple forEach. (#2487)
This commit is contained in:
1 file changed
+1
-1
@@ -59,6 +59,6 @@ public class App {
|
|||||||
list.add(factory.create(WeaponType.SPEAR));
|
list.add(factory.create(WeaponType.SPEAR));
|
||||||
list.add(factory.create(WeaponType.SWORD));
|
list.add(factory.create(WeaponType.SWORD));
|
||||||
list.add(factory.create(WeaponType.BOW));
|
list.add(factory.create(WeaponType.BOW));
|
||||||
list.stream().forEach(weapon -> LOGGER.info("{}", weapon.toString()));
|
list.forEach(weapon -> LOGGER.info("{}", weapon.toString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user