Skip to content

Commit

Permalink
GCI-142 Fixed exposing internal representations of mutable Date objec…
Browse files Browse the repository at this point in the history
…ts in getters of BaseConceptMap (openmrs#3096)
  • Loading branch information
PermissionError authored and dkayiwa committed Dec 22, 2019
1 parent 94d6517 commit e78a888
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions api/src/main/java/org/openmrs/BaseConceptMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ public void setChangedBy(User changedBy) {
*/
@Override
public Date getDateCreated() {
return dateCreated;
if(dateCreated == null) {
return null;
}
return (Date) dateCreated.clone();
}

/**
Expand All @@ -95,7 +98,10 @@ public void setDateCreated(Date dateCreated) {
*/
@Override
public Date getDateChanged() {
return dateChanged;
if(dateChanged == null) {
return null;
}
return (Date) dateChanged.clone();
}

/**
Expand Down

0 comments on commit e78a888

Please sign in to comment.