com.cedarsoftware.util.io.JsonReader requires a public constructor with no arguments (otherwise it'll try to find another constructor and call it with default values, e.g. null may change to 0)

This commit is contained in:
Reinhard Pointner 2016-10-09 17:39:04 +08:00
parent fe30f8a8d5
commit 4833391729
7 changed files with 22 additions and 13 deletions

View File

@ -7,8 +7,12 @@ import java.util.Arrays;
public class SimpleFileInfo implements FileInfo, Comparable<FileInfo> {
private final String path;
private final long length;
private String path;
private long length;
public SimpleFileInfo() {
// used by deserializer
}
public SimpleFileInfo(String path, long length) {
this.path = path;

View File

@ -20,7 +20,8 @@ public class AudioTrack implements Serializable {
protected String mbid; // MusicBrainz Identifier
protected AudioTrack() {
public AudioTrack() {
// used by deserializer
}
public AudioTrack(AudioTrack other) {

View File

@ -26,8 +26,8 @@ public class Episode implements Serializable {
// extended series metadata
protected SeriesInfo seriesInfo;
protected Episode() {
public Episode() {
// used by deserializer
}
public Episode(Episode obj) {
@ -45,8 +45,8 @@ public class Episode implements Serializable {
this.title = title;
this.absolute = absolute;
this.special = special;
this.airdate = (airdate == null ? null : airdate.clone());
this.seriesInfo = (seriesInfo == null ? null : seriesInfo.clone());
this.airdate = airdate == null ? null : airdate.clone();
this.seriesInfo = seriesInfo == null ? null : seriesInfo.clone();
}
public String getSeriesName() {

View File

@ -14,8 +14,8 @@ public class Movie extends SearchResult {
// optional movie name language hint
protected String language;
protected Movie() {
// used by serializer
public Movie() {
// used by deserializer
}
public Movie(int imdbId) {

View File

@ -5,8 +5,8 @@ public class MoviePart extends Movie {
protected int partIndex;
protected int partCount;
protected MoviePart() {
// used by serializer
public MoviePart() {
// used by deserializer
}
public MoviePart(MoviePart obj) {

View File

@ -11,8 +11,8 @@ public class MultiEpisode extends Episode {
protected Episode[] episodes;
protected MultiEpisode() {
// used by serializer
public MultiEpisode() {
// used by deserializer
}
public MultiEpisode(Episode... episodes) {

View File

@ -23,6 +23,10 @@ public class SubtitleSearchResult extends Movie {
private Kind kind;
private int score;
public SubtitleSearchResult() {
// used by deserializer
}
public SubtitleSearchResult(int imdbId, String name, int year, String kind, int score) {
this(name, null, year, imdbId, -1, Locale.ENGLISH, Kind.forName(kind), score);
}