Skip to content

Commit cea61fe

Browse files
Allow an instance_start_time that is not 0
1 parent 03008c9 commit cea61fe

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

couchdb/src/main/java/me/retrodaredevil/couchdbjava/response/DatabaseInfo.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ public DatabaseInfo(
4848
this.compactRunning = compactRunning;
4949
requireNonNull(this.cluster = cluster);
5050
requireNonNull(this.instanceStartTime = instanceStartTime);
51-
if (!instanceStartTime.equals("0")) {
52-
throw new IllegalArgumentException("The instance_start_time must be 0! It is: " + instanceStartTime);
53-
}
5451
}
5552
@JsonValue
5653
private String _jacksonValue() {
@@ -97,6 +94,10 @@ public Cluster getCluster() {
9794
return cluster;
9895
}
9996

97+
/**
98+
* Usually "0", but sometimes may be non-zero depending on database version: https://github.com/apache/couchdb/pull/3901
99+
* @return The database creation time in seconds since the epoch
100+
*/
100101
public String getInstanceStartTime() {
101102
return instanceStartTime;
102103
}

0 commit comments

Comments
 (0)