Removed missleading defaultValue in json config

This commit is contained in:
Anthony RAYMOND 2023-11-01 20:07:15 +01:00
parent ad311b7923
commit edcaa66eae
2 changed files with 4 additions and 4 deletions

View file

@ -29,14 +29,14 @@ public class AppConfiguration {
@JsonProperty(value = "simultaneousSeed", required = true) final int simultaneousSeed,
@JsonProperty(value = "client", required = true) final String client,
@JsonProperty(value = "keepTorrentWithZeroLeechers", required = true) final boolean keepTorrentWithZeroLeechers,
@JsonProperty(value = "uploadRatioTarget", defaultValue = "-1.0", required = false) final float uploadRatioTarget
@JsonProperty(value = "uploadRatioTarget", required = false) final Float uploadRatioTarget
) {
this.minUploadRate = minUploadRate;
this.maxUploadRate = maxUploadRate;
this.simultaneousSeed = simultaneousSeed;
this.client = client;
this.keepTorrentWithZeroLeechers = keepTorrentWithZeroLeechers;
this.uploadRatioTarget = uploadRatioTarget;
this.uploadRatioTarget = uploadRatioTarget == null ? -1.0f : uploadRatioTarget;
validate();
}

View file

@ -27,14 +27,14 @@ public class ConfigIncomingMessage {
@JsonProperty(value = "simultaneousSeed", required = true) final Integer simultaneousSeed,
@JsonProperty(value = "client", required = true) final String client,
@JsonProperty(value = "keepTorrentWithZeroLeechers", required = true) final boolean keepTorrentWithZeroLeechers,
@JsonProperty(value = "uploadRatioTarget", defaultValue = "-1.0", required = false) final Float uploadRatioTarget
@JsonProperty(value = "uploadRatioTarget", required = false) final Float uploadRatioTarget
) {
this.minUploadRate = minUploadRate;
this.maxUploadRate = maxUploadRate;
this.simultaneousSeed = simultaneousSeed;
this.client = client;
this.keepTorrentWithZeroLeechers = keepTorrentWithZeroLeechers;
this.uploadRatioTarget = uploadRatioTarget;
this.uploadRatioTarget = uploadRatioTarget == null ? -1.0f : uploadRatioTarget;
}
public AppConfiguration toAppConfiguration() throws AppConfigurationIntegrityException {