m_bundle = QDBundleFactory.getInst().getBundle(BUNDLE_NAME, locale);
}
+ // This constructor is intended only for use during unit testing.
+ CfbBundle() {
+ m_bundle = null;
+ }
+
public String get(String key, Object... arguments) {
try {
if (null != m_bundle) {
// Fall through to the fallback behaviour below
}
+ return fallbackGet(key, arguments);
+ }
+
+ String fallbackGet(String key, Object... arguments) {
StringBuilder sb = new StringBuilder("[" + key + "]");
for (Object obj : arguments) {
sb.append("[" + obj + "]");
}
return sb.toString();
+
}
}