mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
7.0.0.M1
This commit is contained in:
@@ -146,7 +146,7 @@ public final class CsvWriter implements Closeable, Flushable, Serializable {
|
||||
*/
|
||||
public CsvWriter(final File file, final Charset charset, final boolean isAppend, final CsvWriteConfig config) {
|
||||
this(FileUtil.getWriter(file, charset, isAppend),
|
||||
// https://gitee.com/dromara/hutool/pulls/1011
|
||||
// https://gitee.com/chinabugotech/hutool/pulls/1011
|
||||
isAppend ? (config == null ? CsvWriteConfig.defaultConfig().setEndingLineBreak(true)
|
||||
: config.setEndingLineBreak(true)) : config);
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ public class NumberCellSetter implements CellSetter {
|
||||
|
||||
@Override
|
||||
public void setValue(final Cell cell) {
|
||||
// issue https://gitee.com/dromara/hutool/issues/I43U9G
|
||||
// issue https://gitee.com/chinabugotech/hutool/issues/I43U9G
|
||||
// 避免float到double的精度问题
|
||||
cell.setCellValue(NumberUtil.toDouble(value));
|
||||
}
|
||||
|
@@ -197,7 +197,7 @@ public class SheetDataSaxHandler extends DefaultHandler {
|
||||
*/
|
||||
private void startRow(final Attributes attributes) {
|
||||
final String rValue = AttributeName.r.getValue(attributes);
|
||||
// https://gitee.com/dromara/hutool/issues/I6WYF6
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I6WYF6
|
||||
this.rowNumber = (null == rValue) ? -1 : Long.parseLong(rValue) - 1;
|
||||
}
|
||||
|
||||
|
@@ -22,7 +22,7 @@ import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* https://github.com/dromara/hutool/issues/3088
|
||||
* https://github.com/chinabugotech/hutool/issues/3088
|
||||
*/
|
||||
public class Issue3088Test {
|
||||
@Test
|
||||
|
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* https://gitee.com/dromara/hutool/issues/IA8WE0
|
||||
* https://gitee.com/chinabugotech/hutool/issues/IA8WE0
|
||||
*/
|
||||
public class IssueIA8WE0Test {
|
||||
@Test
|
||||
|
@@ -269,14 +269,14 @@ public class ExcelReadTest {
|
||||
|
||||
@Test
|
||||
public void readColumnNPETest() {
|
||||
// https://github.com/dromara/hutool/pull/2234
|
||||
// https://github.com/chinabugotech/hutool/pull/2234
|
||||
final ExcelReader reader = ExcelUtil.getReader(ResourceUtil.getStream("read_row_npe.xlsx"));
|
||||
reader.readColumn(0, 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void readIssueTest() {
|
||||
//https://gitee.com/dromara/hutool/issues/I5OSFC
|
||||
//https://gitee.com/chinabugotech/hutool/issues/I5OSFC
|
||||
final ExcelReader reader = ExcelUtil.getReader(ResourceUtil.getStream("read.xlsx"));
|
||||
final List<Map<Object, Object>> read = reader.read(1,2,2);
|
||||
for (final Map<Object, Object> map : read) {
|
||||
|
@@ -707,7 +707,7 @@ public class ExcelWriteTest {
|
||||
@Test
|
||||
@Disabled
|
||||
public void mergeTest3() {
|
||||
// https://github.com/dromara/hutool/issues/1696
|
||||
// https://github.com/chinabugotech/hutool/issues/1696
|
||||
|
||||
final List<Map<String, Object>> list = new ArrayList<>();
|
||||
final Map<String, Object> map = new HashMap<>();
|
||||
@@ -737,7 +737,7 @@ public class ExcelWriteTest {
|
||||
@Test
|
||||
@Disabled
|
||||
public void mergeForDateTest() {
|
||||
// https://github.com/dromara/hutool/issues/1911
|
||||
// https://github.com/chinabugotech/hutool/issues/1911
|
||||
|
||||
//通过工具类创建writer
|
||||
final String path = "d:/test/mergeForDate.xlsx";
|
||||
@@ -762,7 +762,7 @@ public class ExcelWriteTest {
|
||||
@Test
|
||||
@Disabled
|
||||
public void writeFloatTest() {
|
||||
//issue https://gitee.com/dromara/hutool/issues/I43U9G
|
||||
//issue https://gitee.com/chinabugotech/hutool/issues/I43U9G
|
||||
final String path = "d:/test/floatTest.xlsx";
|
||||
FileUtil.del(FileUtil.file(path));
|
||||
|
||||
@@ -774,7 +774,7 @@ public class ExcelWriteTest {
|
||||
@Test
|
||||
@Disabled
|
||||
public void writeDoubleTest() {
|
||||
// https://gitee.com/dromara/hutool/issues/I5PI5C
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I5PI5C
|
||||
final String path = "d:/test/doubleTest.xlsx";
|
||||
FileUtil.del(FileUtil.file(path));
|
||||
|
||||
@@ -787,7 +787,7 @@ public class ExcelWriteTest {
|
||||
@Test
|
||||
@Disabled
|
||||
public void issueI466ZZTest() {
|
||||
// https://gitee.com/dromara/hutool/issues/I466ZZ
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I466ZZ
|
||||
// 需要输出S_20000314_x5116_0004
|
||||
// 此处加入一个转义前缀:_x005F
|
||||
final List<Object> row = ListUtil.view(new EscapeStrCellSetter("S_20000314_x5116_0004"));
|
||||
@@ -800,7 +800,7 @@ public class ExcelWriteTest {
|
||||
@Test
|
||||
@Disabled
|
||||
public void writeLongTest() {
|
||||
//https://gitee.com/dromara/hutool/issues/I49R6U
|
||||
//https://gitee.com/chinabugotech/hutool/issues/I49R6U
|
||||
final ExcelWriter writer = ExcelUtil.getWriter("d:/test/long.xlsx");
|
||||
writer.write(ListUtil.view(1427545395336093698L));
|
||||
writer.close();
|
||||
|
@@ -32,7 +32,7 @@ import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
|
||||
/**
|
||||
* https://gitee.com/dromara/hutool/issues/I6MBS5<br>
|
||||
* https://gitee.com/chinabugotech/hutool/issues/I6MBS5<br>
|
||||
* 经过测试,发现BigExcelWriter中的comment会错位<br>
|
||||
* 修正方式见: https://stackoverflow.com/questions/28169011/using-sxssfapache-poi-and-adding-comment-does-not-generate-proper-excel-file
|
||||
*/
|
||||
|
Reference in New Issue
Block a user