mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -4,12 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import cn.hutool.core.lang.Assert;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* CSV中一行的表示
|
||||
@@ -146,7 +141,6 @@ public final class CsvRow implements List<String> {
|
||||
|
||||
@Override
|
||||
public <T> T[] toArray(final T[] a) {
|
||||
//noinspection SuspiciousToArrayCall
|
||||
return this.fields.toArray(a);
|
||||
}
|
||||
|
||||
@@ -162,7 +156,7 @@ public final class CsvRow implements List<String> {
|
||||
|
||||
@Override
|
||||
public boolean containsAll(final Collection<?> c) {
|
||||
return this.fields.containsAll(c);
|
||||
return new HashSet<>(this.fields).containsAll(c);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -320,7 +320,7 @@ public final class CsvWriter implements Closeable, Flushable, Serializable {
|
||||
Assert.notNull(this.config.commentCharacter, "Comment is disable!");
|
||||
try {
|
||||
if(isFirstLine){
|
||||
// 首行不补换行符
|
||||
// 首行不补充换行符
|
||||
isFirstLine = false;
|
||||
}else {
|
||||
writer.write(config.lineDelimiter);
|
||||
|
Reference in New Issue
Block a user