From 5b4a1c4d9c81253382f74b1c27df4e2e8fdd2122 Mon Sep 17 00:00:00 2001 From: Sebastian Peter Date: Wed, 6 Mar 2024 18:59:16 +0100 Subject: [PATCH 1/3] Fixing equals --- src/main/java/edu/ie3/datamodel/models/result/ResultEntity.java | 1 - .../edu/ie3/datamodel/models/timeseries/TimeSeriesEntry.java | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/main/java/edu/ie3/datamodel/models/result/ResultEntity.java b/src/main/java/edu/ie3/datamodel/models/result/ResultEntity.java index 6d502fe43..09ac36ea7 100644 --- a/src/main/java/edu/ie3/datamodel/models/result/ResultEntity.java +++ b/src/main/java/edu/ie3/datamodel/models/result/ResultEntity.java @@ -49,7 +49,6 @@ public void setTime(ZonedDateTime time) { public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; ResultEntity that = (ResultEntity) o; return time.equals(that.time) && inputModel.equals(that.inputModel); } diff --git a/src/main/java/edu/ie3/datamodel/models/timeseries/TimeSeriesEntry.java b/src/main/java/edu/ie3/datamodel/models/timeseries/TimeSeriesEntry.java index ba40bd603..30f487e47 100644 --- a/src/main/java/edu/ie3/datamodel/models/timeseries/TimeSeriesEntry.java +++ b/src/main/java/edu/ie3/datamodel/models/timeseries/TimeSeriesEntry.java @@ -29,8 +29,6 @@ public V getValue() { public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - TimeSeriesEntry entry = (TimeSeriesEntry) o; return value.equals(entry.value); } From 84d4b8995e93f5995b961fa4ccec134367e88b2b Mon Sep 17 00:00:00 2001 From: Sebastian Peter Date: Wed, 6 Mar 2024 19:13:53 +0100 Subject: [PATCH 2/3] Adding to changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b80b8475..f8b3ef6e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed ElectricVehicle Documentation [#875](https://github.com/ie3-institute/PowerSystemDataModel/issues/875) - Fixed Equal behavior of `ConnectorResult` [#1001](https://github.com/ie3-institute/PowerSystemDataModel/issues/1001) - Fixed test for invalid input data in `CsvGraphicSource` [#1022](https://github.com/ie3-institute/PowerSystemDataModel/issues/1022) +- Fixed `equals` of `ResultEntity` and `TimeSeriesEntry` [#1037](https://github.com/ie3-institute/PowerSystemDataModel/issues/1037) ### Changed - Changing from comparing strings to comparing uuids in `EntitySource.findFirstEntityByUuid` [#829](https://github.com/ie3-institute/PowerSystemDataModel/issues/829) From 591b6edf1004a7de6446866b4c334b6d3d163bbe Mon Sep 17 00:00:00 2001 From: Sebastian Peter Date: Wed, 6 Mar 2024 19:15:16 +0100 Subject: [PATCH 3/3] Fixing changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8b3ef6e5..5d6ed40ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased/Snapshot] +### Fixed +- Fixed `equals` of `ResultEntity` and `TimeSeriesEntry` [#1037](https://github.com/ie3-institute/PowerSystemDataModel/issues/1037) + ## [5.0.0] - 2024-03-06 ### Added @@ -27,7 +30,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed ElectricVehicle Documentation [#875](https://github.com/ie3-institute/PowerSystemDataModel/issues/875) - Fixed Equal behavior of `ConnectorResult` [#1001](https://github.com/ie3-institute/PowerSystemDataModel/issues/1001) - Fixed test for invalid input data in `CsvGraphicSource` [#1022](https://github.com/ie3-institute/PowerSystemDataModel/issues/1022) -- Fixed `equals` of `ResultEntity` and `TimeSeriesEntry` [#1037](https://github.com/ie3-institute/PowerSystemDataModel/issues/1037) ### Changed - Changing from comparing strings to comparing uuids in `EntitySource.findFirstEntityByUuid` [#829](https://github.com/ie3-institute/PowerSystemDataModel/issues/829)