From 84d841733090e2518cf68dc70e1a8ff5852a4157 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Fri, 24 Nov 2017 14:38:17 +0000 Subject: [PATCH] JAL-2808 don't cache i18n - MessageManager already does that --- src/jalview/util/matcher/Condition.java | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/jalview/util/matcher/Condition.java b/src/jalview/util/matcher/Condition.java index 3401ae8..3047802 100644 --- a/src/jalview/util/matcher/Condition.java +++ b/src/jalview/util/matcher/Condition.java @@ -2,9 +2,6 @@ package jalview.util.matcher; import jalview.util.MessageManager; -import java.util.HashMap; -import java.util.Map; - /** * An enumeration for binary conditions that a user might choose from when * setting filter or match conditions for values @@ -15,8 +12,6 @@ public enum Condition NotMatches(false, true), Present(false, false), NotPresent(false, false), EQ(true, true), NE(true, true), LT(true, true), LE(true, true), GT(true, true), GE(true, true); - - private static Map displayNames = new HashMap<>(); private boolean numeric; @@ -60,14 +55,7 @@ public enum Condition @Override public String toString() { - String name = displayNames.get(this); - if (name != null) - { - return name; - } - name = MessageManager - .getStringOrReturn("label.matchCondition_", name()); - displayNames.put(this, name); - return name; + return MessageManager.getStringOrReturn("label.matchCondition_", + name()); } } -- 1.7.10.2