Don't delay access to our resources unless we're specifically told that we

should wait.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2246 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2003-02-06 19:13:49 +00:00
parent f3db47e22b
commit 162f0836d9
2 changed files with 19 additions and 3 deletions
@@ -1,5 +1,5 @@
//
// $Id: ResourceBundle.java,v 1.9 2003/02/05 22:48:50 shaper Exp $
// $Id: ResourceBundle.java,v 1.10 2003/02/06 19:13:49 mdb Exp $
package com.threerings.resource;
@@ -30,8 +30,24 @@ public class ResourceBundle
* @param source a file object that references our source jar file.
*/
public ResourceBundle (File source)
{
this(source, false);
}
/**
* Constructs a resource bundle with the supplied jar file.
*
* @param source a file object that references our source jar file.
* @param delay if true, the bundle will wait until someone calls
* {@link #sourceIsReady} before allowing access to its resources.
*/
public ResourceBundle (File source, boolean delay)
{
_source = source;
if (!delay) {
sourceIsReady();
}
}
/**
@@ -1,5 +1,5 @@
//
// $Id: ResourceManager.java,v 1.21 2003/01/18 19:56:45 mdb Exp $
// $Id: ResourceManager.java,v 1.22 2003/02/06 19:13:49 mdb Exp $
package com.threerings.resource;
@@ -474,7 +474,7 @@ public class ResourceManager
// finally, add the file that will be cached to the set as
// a resource bundle
set.add(new ResourceBundle(cfile));
set.add(new ResourceBundle(cfile, true));
} catch (MalformedURLException mue) {
Log.warning("Unable to create URL for resource " +