Skip to content

Commit 0f70e2c

Browse files
committed
fix: getter/setter of revision field to CouchDbDocument
mark it as deprecated
1 parent f2d5286 commit 0f70e2c

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

org.ektorp/src/main/java/org/ektorp/support/CouchDbDocument.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ public class CouchDbDocument extends CouchdbDocument implements Serializable {
2424

2525
private static final long serialVersionUID = 1L;
2626
private String id;
27-
private String revision;
2827
private Map<String, Attachment> attachments;
2928
private List<String> conflicts;
3029
private Revisions revisions;
@@ -47,22 +46,20 @@ public void setId(String s) {
4746
}
4847

4948

49+
@Deprecated
5050
@JsonProperty("_rev")
5151
public String getRevision() {
52-
return revision;
52+
return super.getRev();
5353
}
5454

55+
@Deprecated
5556
@JsonProperty("_rev")
5657
public void setRevision(String s) {
57-
// no empty strings thanks
58-
if (s != null && s.length() == 0) {
59-
return;
60-
}
61-
this.revision = s;
58+
super.setRev(s);
6259
}
6360
@JsonIgnore
6461
public boolean isNew() {
65-
return revision == null;
62+
return super.getRev() == null;
6663
}
6764

6865
@JsonProperty(ATTACHMENTS_NAME)

0 commit comments

Comments
 (0)