DonalEvans commented on a change in pull request #7392:
URL: https://github.com/apache/geode/pull/7392#discussion_r830187158
##########
File path:
geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisList.java
##########
@@ -127,6 +128,32 @@ private int getArrayIndex(int listIndex) {
return listIndex;
}
+ /**
+ * @param elementToInsert element to insert into the set
Review comment:
This should be "element to insert into the list"
##########
File path:
geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisList.java
##########
@@ -229,6 +261,32 @@ public int getDSFID() {
return REDIS_LIST_ID;
}
+ public synchronized int elementInsert(byte[] elementToInsert, byte[]
referenceElement,
+ boolean before) {
+ int i = 0;
Review comment:
Rather than using a separate counter here, you could instead use the
`nextIndex()` or `previousIndex()` methods in `ListIterator` to return the
appropriate index. Really the only reason to create a `ListIterator` rather
than a plain `Iterator` here is to have access to those methods.
--
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]