X-Git-Url: http://jaekl.net/gitweb/?p=cfb.git;a=blobdiff_plain;f=prod%2Fnet%2Fjaekl%2Fcfb%2FCFB.java;fp=prod%2Fnet%2Fjaekl%2Fcfb%2FCFB.java;h=35a08c3b178491f92e1d2c456b53a5900e64db6c;hp=c97a1c8f7b4e74196f528b80d11bb16dfdd22884;hb=a4a577abc3f9b2b1147caafd1cb39fa8c2622cd4;hpb=bedb0c5b72bcbbbcc2b8d11575ad99489aef6853 diff --git a/prod/net/jaekl/cfb/CFB.java b/prod/net/jaekl/cfb/CFB.java index c97a1c8..35a08c3 100644 --- a/prod/net/jaekl/cfb/CFB.java +++ b/prod/net/jaekl/cfb/CFB.java @@ -60,7 +60,6 @@ public class CFB { m_driver = new PostgresqlDriver(); m_schema = new CfbSchema(m_driver); m_locale = locale; - m_bundle = null; m_config = new Config(); m_configFile = new File("config.properties"); @@ -72,12 +71,12 @@ public class CFB { m_output = null; } - CfbBundle getBundle() { + static CfbBundle getBundle(Locale locale) { CfbBundle bundle = m_bundle; if (null == bundle) { synchronized(CFB.class) { if (null == m_bundle) { - m_bundle = bundle = CfbBundle.getInst(m_locale); + m_bundle = bundle = CfbBundle.getInst(locale); } } } @@ -153,7 +152,7 @@ public class CFB { } String trans(String key) { - return getBundle().get(key); + return getBundle(m_locale).get(key); } String getenv(String varName) { @@ -256,12 +255,12 @@ public class CFB { Analysis prior = store.getPrior(analysis); Delta delta = new Delta(prior, analysis); - HtmlReport report = new HtmlReport(getBundle(), messageMap.getColl(), delta); + HtmlReport report = new HtmlReport(getBundle(m_locale), messageMap.getColl(), delta); if (null != m_output) { report.write(m_output); } - Notifier notifier = new Notifier(getBundle(), m_config); + Notifier notifier = new Notifier(getBundle(m_locale), m_config); notifier.sendEmailIfNeeded(pw, report); } catch (StoreException exc) {