From a4d62c28b65b676897216b41de049872f85e6f18 Mon Sep 17 00:00:00 2001 From: ShivanshCharak <96943825+ShivanshCharak@users.noreply.github.com> Date: Sun, 1 Oct 2023 12:30:55 +0530 Subject: [PATCH] Update README.md --- flyweight/README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/flyweight/README.md b/flyweight/README.md index 097bbb82e5b2..3c59f1132410 100644 --- a/flyweight/README.md +++ b/flyweight/README.md @@ -82,18 +82,14 @@ public class PotionFactory { switch (type) { case HEALING -> { potion = new HealingPotion(); - potions.put(type, potion); } case HOLY_WATER -> { potion = new HolyWaterPotion(); - potions.put(type, potion); } case INVISIBILITY -> { potion = new InvisibilityPotion(); - potions.put(type, potion); - } - default -> { } + potions.put(type, potion); } } return potion;