1
0
Fork 0
mirror of https://github.com/overleaf/overleaf.git synced 2025-04-11 03:17:18 +00:00

Initialised descriptionLines.

This commit is contained in:
Winston Li 2014-12-04 20:35:10 +00:00
parent e57f081c80
commit ce9351186c

View file

@ -20,8 +20,6 @@ public class InvalidFilesException extends SnapshotPostException {
public InvalidFilesException(JsonObject json) {
super(json);
descriptionLines = new LinkedList<String>();
descriptionLines.addAll(Arrays.asList(DESCRIPTION_LINES));
}
@Override
@ -36,9 +34,9 @@ public class InvalidFilesException extends SnapshotPostException {
@Override
public void fromJSON(JsonElement json) {
System.out.println(json);
descriptionLines = new LinkedList<String>();
descriptionLines.addAll(Arrays.asList(DESCRIPTION_LINES));
try {
for (JsonElement error : json.getAsJsonObject().get("errors").getAsJsonArray()) {
descriptionLines.add(describeError(error.getAsJsonObject()));
}