Skip to content

Commit

Permalink
issue #2384 - move the private hashCode member to the abstract parents
Browse files Browse the repository at this point in the history
There's no need for each concrete type to define / redefine its own
private member for this and it was causing some trouble with downstream
tooling.

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
  • Loading branch information
lmsurpre committed May 19, 2021
1 parent 0aee2ef commit 9bc1944
Show file tree
Hide file tree
Showing 210 changed files with 6 additions and 1,362 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ public class Account extends DomainResource {
@ReferenceTarget({ "Account" })
private final Reference partOf;

private volatile int hashCode;

private Account(Builder builder) {
super(builder);
identifier = Collections.unmodifiableList(ValidationSupport.checkList(builder.identifier, "identifier", Identifier.class));
Expand Down Expand Up @@ -873,8 +871,6 @@ public static class Coverage extends BackboneElement {
@Summary
private final PositiveInt priority;

private volatile int hashCode;

private Coverage(Builder builder) {
super(builder);
coverage = ValidationSupport.requireNonNull(builder.coverage, "coverage");
Expand Down Expand Up @@ -1156,8 +1152,6 @@ public static class Guarantor extends BackboneElement {
private final Boolean onHold;
private final Period period;

private volatile int hashCode;

private Guarantor(Builder builder) {
super(builder);
party = ValidationSupport.requireNonNull(builder.party, "party");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,6 @@ public class ActivityDefinition extends DomainResource {
private final Canonical transform;
private final List<DynamicValue> dynamicValue;

private volatile int hashCode;

private ActivityDefinition(Builder builder) {
super(builder);
url = builder.url;
Expand Down Expand Up @@ -2476,8 +2474,6 @@ public static class Participant extends BackboneElement {
)
private final CodeableConcept role;

private volatile int hashCode;

private Participant(Builder builder) {
super(builder);
type = ValidationSupport.requireNonNull(builder.type, "type");
Expand Down Expand Up @@ -2748,8 +2744,6 @@ public static class DynamicValue extends BackboneElement {
@Required
private final Expression expression;

private volatile int hashCode;

private DynamicValue(Builder builder) {
super(builder);
path = ValidationSupport.requireNonNull(builder.path, "path");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ public class AdverseEvent extends DomainResource {
@ReferenceTarget({ "ResearchStudy" })
private final List<Reference> study;

private volatile int hashCode;

private AdverseEvent(Builder builder) {
super(builder);
identifier = builder.identifier;
Expand Down Expand Up @@ -1354,8 +1352,6 @@ public static class SuspectEntity extends BackboneElement {
@Summary
private final List<Causality> causality;

private volatile int hashCode;

private SuspectEntity(Builder builder) {
super(builder);
instance = ValidationSupport.requireNonNull(builder.instance, "instance");
Expand Down Expand Up @@ -1674,8 +1670,6 @@ public static class Causality extends BackboneElement {
)
private final CodeableConcept method;

private volatile int hashCode;

private Causality(Builder builder) {
super(builder);
assessment = builder.assessment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ public class AllergyIntolerance extends DomainResource {
private final List<Annotation> note;
private final List<Reaction> reaction;

private volatile int hashCode;

private AllergyIntolerance(Builder builder) {
super(builder);
identifier = Collections.unmodifiableList(ValidationSupport.checkList(builder.identifier, "identifier", Identifier.class));
Expand Down Expand Up @@ -1126,8 +1124,6 @@ public static class Reaction extends BackboneElement {
private final CodeableConcept exposureRoute;
private final List<Annotation> note;

private volatile int hashCode;

private Reaction(Builder builder) {
super(builder);
substance = builder.substance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,6 @@ public class Appointment extends DomainResource {
private final List<Participant> participant;
private final List<Period> requestedPeriod;

private volatile int hashCode;

private Appointment(Builder builder) {
super(builder);
identifier = Collections.unmodifiableList(ValidationSupport.checkList(builder.identifier, "identifier", Identifier.class));
Expand Down Expand Up @@ -1521,8 +1519,6 @@ public static class Participant extends BackboneElement {
private final ParticipationStatus status;
private final Period period;

private volatile int hashCode;

private Participant(Builder builder) {
super(builder);
type = Collections.unmodifiableList(ValidationSupport.checkList(builder.type, "type", CodeableConcept.class));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ public class AppointmentResponse extends DomainResource {
private final ParticipantStatus participantStatus;
private final String comment;

private volatile int hashCode;

private AppointmentResponse(Builder builder) {
super(builder);
identifier = Collections.unmodifiableList(ValidationSupport.checkList(builder.identifier, "identifier", Identifier.class));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,6 @@ public class AuditEvent extends DomainResource {
private final Source source;
private final List<Entity> entity;

private volatile int hashCode;

private AuditEvent(Builder builder) {
super(builder);
type = ValidationSupport.requireNonNull(builder.type, "type");
Expand Down Expand Up @@ -990,8 +988,6 @@ public static class Agent extends BackboneElement {
)
private final List<CodeableConcept> purposeOfUse;

private volatile int hashCode;

private Agent(Builder builder) {
super(builder);
type = builder.type;
Expand Down Expand Up @@ -1630,8 +1626,6 @@ public static class Network extends BackboneElement {
)
private final AuditEventAgentNetworkType type;

private volatile int hashCode;

private Network(Builder builder) {
super(builder);
address = builder.address;
Expand Down Expand Up @@ -1902,8 +1896,6 @@ public static class Source extends BackboneElement {
)
private final List<Coding> type;

private volatile int hashCode;

private Source(Builder builder) {
super(builder);
site = builder.site;
Expand Down Expand Up @@ -2268,8 +2260,6 @@ public static class Entity extends BackboneElement {
private final Base64Binary query;
private final List<Detail> detail;

private volatile int hashCode;

private Entity(Builder builder) {
super(builder);
what = builder.what;
Expand Down Expand Up @@ -2788,8 +2778,6 @@ public static class Detail extends BackboneElement {
@Required
private final Element value;

private volatile int hashCode;

private Detail(Builder builder) {
super(builder);
type = ValidationSupport.requireNonNull(builder.type, "type");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ public class Basic extends DomainResource {
@ReferenceTarget({ "Practitioner", "PractitionerRole", "Patient", "RelatedPerson", "Organization" })
private final Reference author;

private volatile int hashCode;

private Basic(Builder builder) {
super(builder);
identifier = Collections.unmodifiableList(ValidationSupport.checkList(builder.identifier, "identifier", Identifier.class));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ public class Binary extends Resource {
private final Reference securityContext;
private final Base64Binary data;

private volatile int hashCode;

private Binary(Builder builder) {
super(builder);
contentType = ValidationSupport.requireNonNull(builder.contentType, "contentType");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ public class BiologicallyDerivedProduct extends DomainResource {
private final Manipulation manipulation;
private final List<Storage> storage;

private volatile int hashCode;

private BiologicallyDerivedProduct(Builder builder) {
super(builder);
identifier = Collections.unmodifiableList(ValidationSupport.checkList(builder.identifier, "identifier", Identifier.class));
Expand Down Expand Up @@ -870,8 +868,6 @@ public static class Collection extends BackboneElement {
@Choice({ DateTime.class, Period.class })
private final Element collected;

private volatile int hashCode;

private Collection(Builder builder) {
super(builder);
collector = builder.collector;
Expand Down Expand Up @@ -1195,8 +1191,6 @@ public static class Processing extends BackboneElement {
@Choice({ DateTime.class, Period.class })
private final Element time;

private volatile int hashCode;

private Processing(Builder builder) {
super(builder);
description = builder.description;
Expand Down Expand Up @@ -1532,8 +1526,6 @@ public static class Manipulation extends BackboneElement {
@Choice({ DateTime.class, Period.class })
private final Element time;

private volatile int hashCode;

private Manipulation(Builder builder) {
super(builder);
description = builder.description;
Expand Down Expand Up @@ -1807,8 +1799,6 @@ public static class Storage extends BackboneElement {
private final BiologicallyDerivedProductStorageScale scale;
private final Period duration;

private volatile int hashCode;

private Storage(Builder builder) {
super(builder);
description = builder.description;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ public class BodyStructure extends DomainResource {
@Required
private final Reference patient;

private volatile int hashCode;

private BodyStructure(Builder builder) {
super(builder);
identifier = Collections.unmodifiableList(ValidationSupport.checkList(builder.identifier, "identifier", Identifier.class));
Expand Down
12 changes: 0 additions & 12 deletions fhir-model/src/main/java/com/ibm/fhir/model/resource/Bundle.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ public class Bundle extends Resource {
@Summary
private final Signature signature;

private volatile int hashCode;

private Bundle(Builder builder) {
super(builder);
identifier = builder.identifier;
Expand Down Expand Up @@ -581,8 +579,6 @@ public static class Link extends BackboneElement {
@Required
private final Uri url;

private volatile int hashCode;

private Link(Builder builder) {
super(builder);
relation = ValidationSupport.requireNonNull(builder.relation, "relation");
Expand Down Expand Up @@ -867,8 +863,6 @@ public static class Entry extends BackboneElement {
@Summary
private final Response response;

private volatile int hashCode;

private Entry(Builder builder) {
super(builder);
link = Collections.unmodifiableList(ValidationSupport.checkList(builder.link, "link", Bundle.Link.class));
Expand Down Expand Up @@ -1293,8 +1287,6 @@ public static class Search extends BackboneElement {
@Summary
private final Decimal score;

private volatile int hashCode;

private Search(Builder builder) {
super(builder);
mode = builder.mode;
Expand Down Expand Up @@ -1575,8 +1567,6 @@ public static class Request extends BackboneElement {
@Summary
private final String ifNoneExist;

private volatile int hashCode;

private Request(Builder builder) {
super(builder);
method = ValidationSupport.requireNonNull(builder.method, "method");
Expand Down Expand Up @@ -1992,8 +1982,6 @@ public static class Response extends BackboneElement {
@Summary
private final Resource outcome;

private volatile int hashCode;

private Response(Builder builder) {
super(builder);
status = ValidationSupport.requireNonNull(builder.status, "status");
Expand Down
Loading

0 comments on commit 9bc1944

Please sign in to comment.