Skip to content

Commit

Permalink
change method param
Browse files Browse the repository at this point in the history
  • Loading branch information
looly committed Sep 13, 2021
1 parent 5717fb5 commit 6124416
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
### 🐣新特性
* 【core 】 CsvReadConfig增加trimField选项(issue#I49M0C@Gitee)
* 【http 】 HttpBase增加clearHeaders方法(issue#I49P23@Gitee)
* 【core 】 CsvWriter的write和writeBeans参数改为Iterable(issue#I49O4S@Gitee)
*
### 🐞Bug修复
* 【core 】 修复FuncKey函数无效问题
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.io.Serializable;
import java.io.Writer;
import java.nio.charset.Charset;
import java.util.Collection;
import java.util.List;
import java.util.Map;

Expand Down Expand Up @@ -199,7 +198,7 @@ public CsvWriter write(String[]... lines) throws IORuntimeException {
* @return this
* @throws IORuntimeException IO异常
*/
public CsvWriter write(Collection<?> lines) throws IORuntimeException {
public CsvWriter write(Iterable<?> lines) throws IORuntimeException {
if (CollUtil.isNotEmpty(lines)) {
for (Object values : lines) {
appendLine(Convert.toStrArray(values));
Expand Down Expand Up @@ -236,7 +235,7 @@ public CsvWriter write(CsvData csvData) {
* @param beans Bean集合
* @return this
*/
public CsvWriter writeBeans(Collection<?> beans) {
public CsvWriter writeBeans(Iterable<?> beans) {
if (CollUtil.isNotEmpty(beans)) {
boolean isFirst = true;
Map<String, Object> map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -761,4 +761,13 @@ public void issueI466ZZTest(){
writer.writeRow(row);
writer.close();
}

@Test
@Ignore
public void writeLongTest(){
//https://gitee.com/dromara/hutool/issues/I49R6U
final ExcelWriter writer = ExcelUtil.getWriter("d:/test/long.xlsx");
writer.write(ListUtil.of(1427545395336093698L));
writer.close();
}
}

0 comments on commit 6124416

Please sign in to comment.