BOMForNewUTF8Files (@Nullable String externalName) { int i = ArrayUtil.indexOf(EXTERNAL_NAMES, Pair.create(externalName, null), (pair1, pair2) -> pair1.first.equalsIgnoreCase(pair2.first)); if (i == -1) i = 1; // NEVER return EXTERNAL_NAMES[i].second; }