DonalEvans commented on a change in pull request #7519:
URL: https://github.com/apache/geode/pull/7519#discussion_r839047665
##########
File path:
geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/collections/SizeableByteArrayList.java
##########
@@ -141,6 +141,20 @@ public boolean remove(Object o) {
return element;
}
+ @Override
+ public byte[] set(int index, byte[] newElement) {
+ byte[] replacedElement = super.set(index, newElement);
+ memberOverhead -= calculateByteArrayOverhead(replacedElement);
+ memberOverhead += calculateByteArrayOverhead(newElement);
+ return replacedElement;
+ }
+
+ @Override
+ public void add(int index, byte[] element) {
+ memberOverhead += calculateByteArrayOverhead(element);
+ super.add(element);
Review comment:
I just noticed that this should be `super.add(index, element);` which is
why the DUnit tests are failing in pre-checkin.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]