Skip to content

Commit cf37788

Browse files
Moved fix from last commit into interface default method
1 parent b438610 commit cf37788

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

couchdb/src/main/java/me/retrodaredevil/couchdbjava/CouchDbDatabase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ default DocumentResponse updateDocument(String id, DocumentEntityTag eTag, JsonD
7777
* @throws CouchDbException May represent a connection error or that a document wasn't found, permission error, etc.
7878
*/
7979
default DocumentData getDocumentIfUpdated(String id, String revision) throws CouchDbException {
80-
return getDocumentIfUpdated(id, DocumentEntityTag.fromRevision(revision));
80+
return getDocumentIfUpdated(id, revision == null ? null : DocumentEntityTag.fromRevision(revision));
8181
}
8282

8383
DocumentData getDocumentIfUpdated(String id, DocumentEntityTag eTag) throws CouchDbException;

couchdb/src/main/java/me/retrodaredevil/couchdbjava/okhttp/OkHttpCouchDbDatabase.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,6 @@ public DocumentData getDocument(String id) throws CouchDbException {
225225
return getDocumentIfUpdated(id, (DocumentEntityTag) null);
226226
}
227227

228-
@Override
229-
public DocumentData getDocumentIfUpdated(String id, String revision) throws CouchDbException {
230-
return getDocumentIfUpdated(id, revision == null ? null : DocumentEntityTag.fromRevision(revision));
231-
}
232-
233228
@Override
234229
public DocumentData getDocumentIfUpdated(String id, @Nullable DocumentEntityTag eTag) throws CouchDbException {
235230
// https://docs.couchdb.org/en/stable/api/document/common.html#get--db-docid

0 commit comments

Comments
 (0)