X-Git-Url: http://jaekl.net/gitweb/?a=blobdiff_plain;f=prod%2Fnet%2Fjaekl%2Fcfb%2FCfbBundle.java;h=3914b6d2fe5a4b4e753c150069465d72b5d26ffb;hb=e6448f6cf67e5a5409f24b531c2443b3bed53b52;hp=8ea3c68f669d8306f6e43027251f47aa22e46ed8;hpb=1b35159cf2ff8d86b037f7d442f7b1f4c8e3b2f3;p=cfb.git diff --git a/prod/net/jaekl/cfb/CfbBundle.java b/prod/net/jaekl/cfb/CfbBundle.java index 8ea3c68..3914b6d 100644 --- a/prod/net/jaekl/cfb/CfbBundle.java +++ b/prod/net/jaekl/cfb/CfbBundle.java @@ -13,12 +13,19 @@ import net.jaekl.qd.QDBundleFactory; public class CfbBundle { public static final String ANALYSIS_FAILED = "analysis.failed"; public static final String ANALYZED_AT = "analyzed.at"; + public static final String BUG_CATEGORY_UNKNOWN = "bug.category.unknown"; + public static final String BUG_TYPE_UNKNOWN = "bug.type.unknown"; public static final String CANNOT_CONNECT = "cannot.connect.to.db"; public static final String CANNOT_EXEC = "cannot.exec"; + public static final String CANNOT_LOAD_FBMSG_FILE = "cannot.load.fbmsg.file"; + public static final String CANNOT_SEND_MAIL = "cannot.send.mail"; public static final String CFB = "cfb"; + public static final String CFB_MAIL_SUBJECT = "cfb.mail.subject"; public static final String CFB_REPORT = "cfb.report"; public static final String COMPARING_RUNS = "comparing.runs"; public static final String COMPARING_VERSIONS = "comparing.versions"; + public static final String FINDBUGS_HOME_IS_NOT_SET = "findbugs.home.is.not.set"; + public static final String FINDBUGS_HOME_IS_SET_TO = "findbugs.home.is.set.to"; public static final String FIXED_BUGS = "fixed.bugs"; public static final String NEW_BUGS = "new.bugs"; public static final String NEW_VERSION = "new.version"; @@ -54,6 +61,11 @@ public class CfbBundle { 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) { @@ -67,10 +79,15 @@ public class CfbBundle { // 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(); + } }