Avoiding some error output we dislike.

This commit is contained in:
Olof Larsson 2012-08-31 19:08:11 +02:00
parent e286f923b1
commit 46b044e5c4
2 changed files with 5 additions and 1 deletions

View File

@ -119,6 +119,7 @@ public class DriverGson extends DriverAbstract<JsonElement>
if (mtime == 0) return null;
String content = DiscUtil.readCatch(file);
if (content == null) return null;
if (content.length() == 0) return null;
JsonElement raw = new JsonParser().parse(content);
return new SimpleEntry<JsonElement, Long>(raw, mtime);
}

View File

@ -213,13 +213,16 @@ public class Txt
StringBuilder ret = new StringBuilder();
for (int i=0; i<list.length; i++)
{
Object item = list[i];
String str = (item == null ? "NULL" : item.toString());
if (i!=0)
{
ret.append(glue);
}
if (format != null)
{
ret.append(String.format(format, list[i].toString()));
ret.append(String.format(format, str));
}
else
{