CachedFormats () { CachedFormats formats = ourFormats; Locale locale = DynamicBundle.getLocale(); if (formats == null || formats.locale != locale) { // Not a big problem if two identical formats are created concurrently, // so we can skip locking and CAS ourFormats = formats = new CachedFormats(locale); } return formats; }