Avoiding some error output we dislike.
This commit is contained in:
parent
e286f923b1
commit
46b044e5c4
@ -119,6 +119,7 @@ public class DriverGson extends DriverAbstract<JsonElement>
|
|||||||
if (mtime == 0) return null;
|
if (mtime == 0) return null;
|
||||||
String content = DiscUtil.readCatch(file);
|
String content = DiscUtil.readCatch(file);
|
||||||
if (content == null) return null;
|
if (content == null) return null;
|
||||||
|
if (content.length() == 0) return null;
|
||||||
JsonElement raw = new JsonParser().parse(content);
|
JsonElement raw = new JsonParser().parse(content);
|
||||||
return new SimpleEntry<JsonElement, Long>(raw, mtime);
|
return new SimpleEntry<JsonElement, Long>(raw, mtime);
|
||||||
}
|
}
|
||||||
|
@ -213,13 +213,16 @@ public class Txt
|
|||||||
StringBuilder ret = new StringBuilder();
|
StringBuilder ret = new StringBuilder();
|
||||||
for (int i=0; i<list.length; i++)
|
for (int i=0; i<list.length; i++)
|
||||||
{
|
{
|
||||||
|
Object item = list[i];
|
||||||
|
String str = (item == null ? "NULL" : item.toString());
|
||||||
|
|
||||||
if (i!=0)
|
if (i!=0)
|
||||||
{
|
{
|
||||||
ret.append(glue);
|
ret.append(glue);
|
||||||
}
|
}
|
||||||
if (format != null)
|
if (format != null)
|
||||||
{
|
{
|
||||||
ret.append(String.format(format, list[i].toString()));
|
ret.append(String.format(format, str));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user