public static String getResourceString(Bundle bundle, String value, ResourceBundle resourceBundle) { String s = value.trim(); if (!s.startsWith(KEY_PREFIX, 0)) return s; if (s.startsWith(KEY_DOUBLE_PREFIX, 0)) return s.substring(1);  int ix = s.indexOf(' '); String key = ix == -1 ? s : s.substring(0, ix); String dflt = ix == -1 ? s : s.substring(ix + 1);  if (resourceBundle == null && bundle != null) { try { resourceBundle = getResourceBundle(bundle); } catch (MissingResourceException e) {  } }  if (resourceBundle == null) return dflt;  try { return resourceBundle.getString(key.substring(1)); } catch (MissingResourceException e) {  return dflt; }
public static String getResourceString(Bundle bundle, String value) { return getResourceString(bundle, value, null);
	public static String getResourceString(Bundle bundle, String value, ResourceBundle resourceBundle) {		String s = value.trim();		if (!s.startsWith(KEY_PREFIX, 0))			return s;		if (s.startsWith(KEY_DOUBLE_PREFIX, 0))			return s.substring(1);		int ix = s.indexOf(' ');		String key = ix == -1 ? s : s.substring(0, ix);		String dflt = ix == -1 ? s : s.substring(ix + 1);		if (resourceBundle == null && bundle != null) {			try {				resourceBundle = getResourceBundle(bundle);			} catch (MissingResourceException e) {				// just return the default (dflt)			}		}		if (resourceBundle == null)			return dflt;		try {			return resourceBundle.getString(key.substring(1));		} catch (MissingResourceException e) {			//this will avoid requiring a bundle access on the next lookup			return dflt;		}	}