From 383acdc9670c66af3fde0583e3250443d9fe1911 Mon Sep 17 00:00:00 2001 From: Pahimar Date: Sun, 1 Feb 2015 22:17:51 -0500 Subject: [PATCH] Testing abstracting out the release type to build.properties --- src/main/java/com/pahimar/ee3/recipe/RecipeRegistry.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/pahimar/ee3/recipe/RecipeRegistry.java b/src/main/java/com/pahimar/ee3/recipe/RecipeRegistry.java index c780c4f2..8756c295 100644 --- a/src/main/java/com/pahimar/ee3/recipe/RecipeRegistry.java +++ b/src/main/java/com/pahimar/ee3/recipe/RecipeRegistry.java @@ -13,6 +13,7 @@ public class RecipeRegistry private static RecipeRegistry recipeRegistry = null; private Multimap> recipeMap; + private ImmutableMultimap> immutableRecipeMap; private RecipeRegistry() { @@ -70,6 +71,11 @@ public class RecipeRegistry public Multimap> getRecipeMappings() { - return ImmutableMultimap.copyOf(recipeRegistry.recipeMap); + if (immutableRecipeMap == null) + { + return ImmutableMultimap.copyOf(recipeRegistry.recipeMap); + } + + return immutableRecipeMap; } } \ No newline at end of file