Set _sourceLastMod to -1 when uninitialized instead of 0, so that we can
distinguish between uninitialized and various file errors, and hopefully get us some better logging output. (If there are errors with a file, lastModified() returns 0, which would have caused resolveJarFile to think that the bundle just wasn't ready yet and not create the JarFile object, which resulted in a NPE, and not useful IOEs.) git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2709 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: ResourceBundle.java,v 1.18 2003/06/19 01:12:59 ray Exp $
|
// $Id: ResourceBundle.java,v 1.19 2003/07/14 22:18:18 ray Exp $
|
||||||
|
|
||||||
package com.threerings.resource;
|
package com.threerings.resource;
|
||||||
|
|
||||||
@@ -293,7 +293,7 @@ public class ResourceBundle
|
|||||||
{
|
{
|
||||||
// if we don't yet have our resource bundle's last mod time, we
|
// if we don't yet have our resource bundle's last mod time, we
|
||||||
// have not yet been notified that it is ready
|
// have not yet been notified that it is ready
|
||||||
if (_sourceLastMod == 0) {
|
if (_sourceLastMod == -1) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -365,7 +365,7 @@ public class ResourceBundle
|
|||||||
protected File _source;
|
protected File _source;
|
||||||
|
|
||||||
/** The last modified time of our source jar file. */
|
/** The last modified time of our source jar file. */
|
||||||
protected long _sourceLastMod;
|
protected long _sourceLastMod = -1;
|
||||||
|
|
||||||
/** A file whose timestamp indicates whether or not our existing jar
|
/** A file whose timestamp indicates whether or not our existing jar
|
||||||
* file has been unpacked. */
|
* file has been unpacked. */
|
||||||
|
|||||||
Reference in New Issue
Block a user