protected String getStringOrNull(ResourceBundle bundle, String key) {
        if (bundle.containsKey(key)) {
            try {
                return bundle.getString(key);
            } catch (MissingResourceException ex) {
                // Assume key not found for some other reason
                // -> do NOT throw the exception to allow for checking parent message source.
            }
        }
        return null;
    }
protected String getStringOrNull ( ResourceBundle bundle , String key ) { if ( bundle . containsKey ( key ) ) { try { return bundle . getString ( key ) ; } catch ( MissingResourceException ex ) { } } return null ; }
Efficiently retrieve the String value for the specified key,
or return {@code null} if not found.

@param bundle the ResourceBundle to perform the lookup in
@param key the key to look up
@return the associated value, or {@code null} if none
@see ResourceBundle#getString(String) ResourceBundle#getString(String)
@see ResourceBundle#containsKey(String) ResourceBundle#containsKey(String)