Code example for ResourceBundle

Methods: containsKey

0
        assertTrue(bundle.containsKey("propertyInFR"));
 
        ResourceBundle.clearCache(URL_LOADER);
        bundle = ResourceBundle.getBundle(PROPERTIES_NAME, LOCALE_FR,
                URL_LOADER, DEFAULT_CONTROL);
        assertTrue(bundle.containsKey("property"));
        assertFalse(bundle.containsKey("propertyInFRFR"));
        assertTrue(bundle.containsKey("propertyInFR"));
        assertTrue(bundle.containsKey("propertyInURLParent"));
        assertFalse(bundle.containsKey("propertyInSystemParent"));
 
        ResourceBundle.clearCache();
        bundle = ResourceBundle.getBundle(PROPERTIES_NAME, LOCALE_FR,
                SYSTEM_LOADER, DEFAULT_CONTROL);
        assertTrue(bundle.containsKey("property"));
        assertFalse(bundle.containsKey("propertyInURLParent"));
        assertTrue(bundle.containsKey("propertyInSystemParent"));
 
        ResourceBundle.clearCache();
        bundle = ResourceBundle.getBundle(CLASS_NAME, LOCALE_FR, SYSTEM_LOADER,
                DEFAULT_CONTROL);