Merge branch 'rel_6_4' of github.com:hapifhir/hapi-fhir into rel_6_4

This commit is contained in:
Tadgh 2023-02-27 16:20:22 -08:00
commit 49e7adebb4
2 changed files with 11 additions and 2 deletions

View File

@ -0,0 +1,5 @@
---
type: fix
issue: 4604
jira: SMILE-4688
title: "Doing a GET for a resource tag created before 4204 will return a null error on userSelected. This has been fixed by defaulting null to false."

View File

@ -86,7 +86,7 @@ public class TagDefinition implements Serializable {
private String myVersion; private String myVersion;
@Column(name = "TAG_USER_SELECTED") @Column(name = "TAG_USER_SELECTED")
private boolean myUserSelected; private Boolean myUserSelected;
@Transient @Transient
private transient Integer myHashCode; private transient Integer myHashCode;
@ -162,7 +162,11 @@ public class TagDefinition implements Serializable {
} }
} }
public Boolean getUserSelected() { return myUserSelected; } public Boolean getUserSelected() {
// TODO: LD: this is not ideal as we are implicitly assuming null is false.
// Ideally we should fix IBaseCoding to return wrapper Boolean but that will involve another core/hapi release
return myUserSelected != null ? myUserSelected : false;
}
public void setUserSelected(Boolean theUserSelected) { public void setUserSelected(Boolean theUserSelected) {
myUserSelected = theUserSelected != null && theUserSelected; myUserSelected = theUserSelected != null && theUserSelected;