mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
0
hutool-core/src/main/java/cn/hutool/core/bean/BeanUtil.java
Normal file → Executable file
0
hutool-core/src/main/java/cn/hutool/core/bean/BeanUtil.java
Normal file → Executable file
@@ -15,11 +15,11 @@ import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 身份证相关工具类<br>
|
||||
* see https://www.oschina.net/code/snippet_1611_2881
|
||||
* see <a href="https://www.oschina.net/code/snippet_1611_2881">https://www.oschina.net/code/snippet_1611_2881</a>
|
||||
*
|
||||
* <p>
|
||||
* 本工具并没有对行政区划代码做校验,如有需求,请参阅(2018年10月):
|
||||
* http://www.mca.gov.cn/article/sj/xzqh/2018/201804-12/20181011221630.html
|
||||
* <a href="http://www.mca.gov.cn/article/sj/xzqh/2018/201804-12/20181011221630.html">http://www.mca.gov.cn/article/sj/xzqh/2018/201804-12/20181011221630.html</a>
|
||||
* </p>
|
||||
*
|
||||
* @author Looly
|
||||
|
@@ -1,10 +1,15 @@
|
||||
package cn.hutool.core.text.csv;
|
||||
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.lang.Console;
|
||||
import cn.hutool.core.util.CharsetUtil;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class CsvWriterTest {
|
||||
|
||||
@Test
|
||||
@@ -23,4 +28,20 @@ public class CsvWriterTest {
|
||||
writer.writeLine("李四", "男", "XX市XX区,01号");
|
||||
writer.close();
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void issue2255Test(){
|
||||
String fileName = "D:/test/" + new Random().nextInt(100) + "-a.csv";
|
||||
CsvWriter writer = CsvUtil.getWriter(fileName, CharsetUtil.CHARSET_UTF_8);
|
||||
List<String> list = new ArrayList<>();
|
||||
for (int i = 0; i < 10000; i++) {
|
||||
list.add(i+"");
|
||||
}
|
||||
Console.log("{} : {}", fileName, list.size());
|
||||
for (String s : list) {
|
||||
writer.writeLine(s);
|
||||
}
|
||||
writer.close();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user