You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/12/30 08:36:32 UTC

[GitHub] [ignite] nizhikov commented on a change in pull request #9687: IGNITE-16188 Eliminate intermediate list for DataRecord

nizhikov commented on a change in pull request #9687:
URL: https://github.com/apache/ignite/pull/9687#discussion_r776620828



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/DataRecord.java
##########
@@ -90,7 +83,31 @@ public DataRecord setWriteEntries(List<DataEntry> writeEntries) {
      * @return Collection of write entries.
      */
     public List<DataEntry> writeEntries() {
-        return writeEntries == null ? Collections.<DataEntry>emptyList() : writeEntries;
+        if (writeEntries instanceof DataEntry)
+            return Collections.singletonList((DataEntry)writeEntries);
+
+        return writeEntries == null ? Collections.emptyList() : (List<DataEntry>)writeEntries;

Review comment:
       Fixed.




-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org