mirror of
https://github.com/anthonyraymond/joal.git
synced 2024-09-20 07:16:26 +08:00
Removed missleading defaultValue in json config
This commit is contained in:
parent
ad311b7923
commit
edcaa66eae
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue