Skip to content

Commit

Permalink
SHIBUI-1880
Browse files Browse the repository at this point in the history
Annotation so that new accessor to LocalDateTime for modified date
doesn't get added to JSON/XML representations (it already is in string
form)
  • Loading branch information
chasegawa committed May 19, 2021
1 parent e08f9d7 commit 743954c
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package edu.internet2.tier.shibboleth.admin.ui.domain.frontend;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

Expand Down Expand Up @@ -189,6 +190,7 @@ public String getModifiedDate() {
return modifiedDate != null ? modifiedDate.toString() : null;
}

@JsonIgnore
public LocalDateTime getModifiedDateAsDate() {
// we shouldn't have an ED without either modified or created date, so this is mostly for testing where data can be odd
return modifiedDate != null ? modifiedDate : createdDate != null ? createdDate : LocalDateTime.now();
Expand Down

0 comments on commit 743954c

Please sign in to comment.