File tree Expand file tree Collapse file tree
protocol/src/main/java/com/zfoo/protocol/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,15 +84,15 @@ public static <T> String toCsv(List<T> list) {
8484 var fields = ReflectionUtils .notStaticAndTransientFields (clazz );
8585 fields .forEach (it -> ReflectionUtils .makeAccessible (it ));
8686
87- var headers = fields .stream ().map (it -> it .getName ()).collect (Collectors .joining (StringUtils .COMMA_REGEX ));
87+ var headers = fields .stream ().map (it -> it .getName ()).collect (Collectors .joining (StringUtils .COMMA ));
8888 builder .append (headers ).append (FileUtils .LS );
8989
9090 // data row
9191 for (T obj : list ) {
9292 var row = fields .stream ()
9393 .map (it -> ReflectionUtils .getField (it , obj ))
9494 .map (it -> it .toString ())
95- .collect (Collectors .joining (StringUtils .COMMA_REGEX ));
95+ .collect (Collectors .joining (StringUtils .COMMA ));
9696 builder .append (row ).append (FileUtils .LS );
9797 }
9898
You can’t perform that action at this time.
0 commit comments