From 96998e5678c3ab20dde53e037b67ba32f194638a Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Mon, 14 Jul 2003 22:18:18 +0000 Subject: [PATCH] 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 --- src/java/com/threerings/resource/ResourceBundle.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/java/com/threerings/resource/ResourceBundle.java b/src/java/com/threerings/resource/ResourceBundle.java index 2e3b72ed3..392050e2c 100644 --- a/src/java/com/threerings/resource/ResourceBundle.java +++ b/src/java/com/threerings/resource/ResourceBundle.java @@ -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; @@ -293,7 +293,7 @@ public class ResourceBundle { // if we don't yet have our resource bundle's last mod time, we // have not yet been notified that it is ready - if (_sourceLastMod == 0) { + if (_sourceLastMod == -1) { return true; } @@ -365,7 +365,7 @@ public class ResourceBundle protected File _source; /** 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 * file has been unpacked. */