Copilot commented on code in PR #612:
URL: https://github.com/apache/fesod/pull/612#discussion_r2384227241


##########
fesod/src/main/java/org/apache/fesod/excel/write/merge/LoopMergeStrategy.java:
##########
@@ -81,6 +81,12 @@ public void afterRowDispose(RowWriteHandlerContext context) {
                     columnIndex,
                     columnIndex + columnExtend - 1);
             
context.getWriteSheetHolder().getSheet().addMergedRegionUnsafe(cellRangeAddress);
+        } else {
+            // Iterate through the columns to clear the content of merged cells
+            for (int i = 0; i < columnExtend; i++) {
+                // Access the cell at the specified column index in the 
current row and set it to blank
+                context.getRow().getCell(columnIndex + i).setBlank();

Review Comment:
   Potential NullPointerException if `getCell(columnIndex + i)` returns null. 
The cell should be created if it doesn't exist before calling `setBlank()`.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to