mirror of
https://github.com/torproject/metrics-lib.git
synced 2024-11-23 01:09:47 +00:00
Make tests pass again. Gson demands no-args constructors.
This commit is contained in:
parent
9a61983055
commit
fa2d227527
@ -26,6 +26,13 @@ public class DirectoryNode implements Comparable<DirectoryNode> {
|
||||
@Expose
|
||||
public final SortedSet<DirectoryNode> directories;
|
||||
|
||||
/* Added to satisfy Gson. */
|
||||
private DirectoryNode() {
|
||||
path = null;
|
||||
files = null;
|
||||
directories = null;
|
||||
}
|
||||
|
||||
/** A directory for the JSON structure. */
|
||||
public DirectoryNode(String path, SortedSet<FileNode> files,
|
||||
SortedSet<DirectoryNode> directories) {
|
||||
|
@ -39,6 +39,13 @@ public class FileNode implements Comparable<FileNode> {
|
||||
|
||||
private long lastModifiedMillis;
|
||||
|
||||
/* Added to satisfy Gson. */
|
||||
private FileNode() {
|
||||
path = null;
|
||||
size = 0;
|
||||
lastModified = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A FileNode needs a path, i.e. the file name, the file size, and
|
||||
* the last modified date-time string.
|
||||
|
@ -56,6 +56,14 @@ public class IndexNode {
|
||||
@Expose
|
||||
public final SortedSet<FileNode> files;
|
||||
|
||||
/* Added to satisfy Gson. */
|
||||
private IndexNode() {
|
||||
created = null;
|
||||
path = null;
|
||||
files = null;
|
||||
directories = null;
|
||||
}
|
||||
|
||||
/** An index node is the top-level node in the JSON structure. */
|
||||
public IndexNode(String created, String path,
|
||||
SortedSet<FileNode> files,
|
||||
|
Loading…
Reference in New Issue
Block a user