This commit is contained in:
choweli
2025-04-17 10:55:02 +08:00
parent 22d487624d
commit 038a6ca0c8
123 changed files with 232 additions and 224 deletions

View File

@@ -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);
}

View File

@@ -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));
}

View File

@@ -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;
}

View File

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

View File

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

View File

@@ -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) {

View File

@@ -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();

View File

@@ -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
*/