bengbengbalabalabeng commented on issue #665:
URL: https://github.com/apache/fesod/issues/665#issuecomment-3473180254

   I think there are a few ways to handle this:
   
   1. In 
`cn.idev.excel.metadata.AbstractParameterBuilder#head(List<List<String>>)`
      - When assigning values, first check for null, then convert 
`List<String>` into `ArrayList<String>` to make sure it’s mutable.  
   
   2. In `cn.idev.excel.metadata.property.ExcelHeadProperty#ExcelHeadProperty` 
constructor  
      - Wrap `head.get(i)` with `ArrayList<String>`.  
      - But since the constructor may run multiple times during debugging, this 
could lead to repeated wrapping.  
   
   Both approaches can avoid the `UnsupportedOperationException` that happens 
when using immutable collections like `Arrays.asList`, `List.of`, 
`Collections.unmodifiableList` or `Collections.singletonList`. 


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