Not to choke if we don't have a site identifier or site resource loader.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@725 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: MessageManager.java,v 1.4 2001/11/06 20:16:46 mdb Exp $
|
// $Id: MessageManager.java,v 1.5 2002/05/02 07:20:25 mdb Exp $
|
||||||
//
|
//
|
||||||
// samskivert library - useful routines for java programs
|
// samskivert library - useful routines for java programs
|
||||||
// Copyright (C) 2001 Michael Bayne
|
// Copyright (C) 2001 Michael Bayne
|
||||||
@@ -135,19 +135,23 @@ public class MessageManager
|
|||||||
return bundles;
|
return bundles;
|
||||||
}
|
}
|
||||||
|
|
||||||
int siteId = _siteIdent.identifySite(req);
|
// grab our site-specific class loader if we have one
|
||||||
ClassLoader siteLoader = null;
|
ClassLoader siteLoader = null;
|
||||||
try {
|
if (_siteLoader != null && _siteIdent != null) {
|
||||||
siteLoader = _siteLoader.getSiteClassLoader(siteId);
|
int siteId = _siteIdent.identifySite(req);
|
||||||
} catch (IOException ioe) {
|
try {
|
||||||
Log.warning("Unable to fetch site-specific classloader " +
|
siteLoader = _siteLoader.getSiteClassLoader(siteId);
|
||||||
"[siteId=" + siteId + ", error=" + ioe + "].");
|
|
||||||
|
} catch (IOException ioe) {
|
||||||
|
Log.warning("Unable to fetch site-specific classloader " +
|
||||||
|
"[siteId=" + siteId + ", error=" + ioe + "].");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// otherwise try looking up the appropriate bundles
|
// try looking up the appropriate bundles
|
||||||
bundles = new ResourceBundle[2];
|
bundles = new ResourceBundle[2];
|
||||||
|
|
||||||
// first from the site-specific classloader (if we've got one)
|
// first from the site-specific classloader
|
||||||
if (siteLoader != null) {
|
if (siteLoader != null) {
|
||||||
bundles[0] = resolveBundle(req, _siteBundlePath, siteLoader);
|
bundles[0] = resolveBundle(req, _siteBundlePath, siteLoader);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user