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



##########
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:
       I don't think that "writeEntries == null" is a realistic scenario. Other 
methods ignore such check. Can you please remove it here as well and maybe add 
"requireNotNull" in the constructor? Thank you!




-- 
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]


Reply via email to