Improve date setting.

This commit is contained in:
Christian P. MOMON 2013-09-11 14:36:41 +02:00
parent 025feb7e3b
commit 9097faf0e2

View file

@ -95,11 +95,15 @@ public class Element {
} }
public void setArchiveDate(final Date archiveDate) { public void setArchiveDate(final Date archiveDate) {
this.archiveDate = archiveDate; if (archiveDate == null) {
this.archiveDate = null;
} else {
this.archiveDate = (Date) archiveDate.clone();
}
} }
public void setCreationDate(final Date creationDate) { public void setCreationDate(final Date creationDate) {
this.creationDate = creationDate; this.creationDate = (Date) creationDate.clone();
} }
public void setDigest(final String digest) { public void setDigest(final String digest) {
@ -107,7 +111,7 @@ public class Element {
} }
public void setEditionDate(final Date editionDate) { public void setEditionDate(final Date editionDate) {
this.editionDate = editionDate; this.editionDate = (Date) editionDate.clone();
} }
public void setKey(final String key) { public void setKey(final String key) {