From: gmungoc Date: Fri, 24 Nov 2017 14:38:17 +0000 (+0000) Subject: JAL-2808 don't cache i18n - MessageManager already does that X-Git-Tag: Release_2_11_0~104 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=84d841733090e2518cf68dc70e1a8ff5852a4157;p=jalview.git JAL-2808 don't cache i18n - MessageManager already does that --- 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()); } }