If there is a problem reading the blacklist file from disk, previously,
null would be returned from the DDSaveHandler.readBlacklist method.  This
would result in a crash later on down the line when we tried to iterate
the blacklist.  Now we return an empty array.  I'd like to be able to
diagnose the issues causing the blacklist file to be corrupted, but
unfortunately when this issue crops up, people only post the crash :(
This commit is contained in:
Stephen Baynham 2015-07-21 20:09:51 -04:00
parent 5e7cb14219
commit caca861c7b

View file

@ -424,12 +424,14 @@ public class DDSaveHandler
{
try
{
return reader.readFromFile(blacklistFile);
List<Integer> list = reader.readFromFile(blacklistFile);
if (list == null)
return new ArrayList<Integer>(0);
}
catch (Exception e)
{
e.printStackTrace();
return null;
return new ArrayList<Integer>(0);
}
}