mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-05 12:14:18 +00:00
Code cleanup (#1461)
* Code cleanup * Fix flux tests * Fix checkstyle errors * Fix compile error
This commit is contained in:
1 parent
5381387026
commit
417f21ed3d
243 files changed
+1154
-1162
No files matched your search
+2
-2
@@ -36,7 +36,7 @@ The main class in our example is the treasure chest that contains items.
|
||||
```java
|
||||
public class TreasureChest {
|
||||
|
||||
private List<Item> items;
|
||||
private final List<Item> items;
|
||||
|
||||
public TreasureChest() {
|
||||
items = List.of(
|
||||
@@ -64,7 +64,7 @@ public class TreasureChest {
|
||||
public class Item {
|
||||
|
||||
private ItemType type;
|
||||
private String name;
|
||||
private final String name;
|
||||
|
||||
public Item(ItemType type, String name) {
|
||||
this.setType(type);
|
||||
|
||||
Reference in new issue
Block a user