Skip to content

Commit

Permalink
make check positive
Browse files Browse the repository at this point in the history
  • Loading branch information
kevodwyer committed Mar 2, 2023
1 parent 0485970 commit c09a0c0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/io/ipfs/api/IPFS.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,18 @@ public IPFS(MultiAddress addr) {
}

public IPFS(String host, int port, String version, boolean ssl) {
this(host, port, version, false, DEFAULT_CONNECT_TIMEOUT_MILLIS, DEFAULT_READ_TIMEOUT_MILLIS, ssl);
this(host, port, version, true, DEFAULT_CONNECT_TIMEOUT_MILLIS, DEFAULT_READ_TIMEOUT_MILLIS, ssl);
}

public IPFS(String host, int port, String version, boolean overrideMinVersionCheck, boolean ssl) {
this(host, port, version, overrideMinVersionCheck, DEFAULT_CONNECT_TIMEOUT_MILLIS, DEFAULT_READ_TIMEOUT_MILLIS, ssl);
public IPFS(String host, int port, String version, boolean enforceMinVersion, boolean ssl) {
this(host, port, version, enforceMinVersion, DEFAULT_CONNECT_TIMEOUT_MILLIS, DEFAULT_READ_TIMEOUT_MILLIS, ssl);
}

public IPFS(String host, int port, String version, int connectTimeoutMillis, int readTimeoutMillis, boolean ssl) {
this(host, port, version, false, connectTimeoutMillis, readTimeoutMillis, ssl);
this(host, port, version, true, connectTimeoutMillis, readTimeoutMillis, ssl);
}

public IPFS(String host, int port, String version, boolean overrideMinVersionCheck, int connectTimeoutMillis, int readTimeoutMillis, boolean ssl) {
public IPFS(String host, int port, String version, boolean enforceMinVersion, int connectTimeoutMillis, int readTimeoutMillis, boolean ssl) {
if (connectTimeoutMillis < 0) throw new IllegalArgumentException("connect timeout must be zero or positive");
if (readTimeoutMillis < 0) throw new IllegalArgumentException("read timeout must be zero or positive");
this.host = host;
Expand All @@ -94,7 +94,7 @@ public IPFS(String host, int port, String version, boolean overrideMinVersionChe

this.apiVersion = version;
// Check IPFS is sufficiently recent
if (!overrideMinVersionCheck) {
if (enforceMinVersion) {
try {
Version detected = Version.parse(version());
if (detected.isBefore(MIN_VERSION))
Expand Down

0 comments on commit c09a0c0

Please sign in to comment.