| 1 | package edu.ucsb.cs156.frontiers.utilities; | |
| 2 | ||
| 3 | import com.opencsv.CSVWriter; | |
| 4 | import com.opencsv.bean.StatefulBeanToCsv; | |
| 5 | import com.opencsv.bean.StatefulBeanToCsvBuilder; | |
| 6 | import com.opencsv.bean.exceptionhandler.ExceptionHandlerIgnore; | |
| 7 | import java.io.Writer; | |
| 8 | import org.springframework.stereotype.Component; | |
| 9 | ||
| 10 | @Component | |
| 11 | public class StatefulBeanToCsvBuilderFactory { | |
| 12 | ||
| 13 | public <T> StatefulBeanToCsv<T> build(Writer writer) { | |
| 14 |
1
1. build : replaced return value with null for edu/ucsb/cs156/frontiers/utilities/StatefulBeanToCsvBuilderFactory::build → KILLED |
return new StatefulBeanToCsvBuilder<T>(writer) |
| 15 | .withSeparator(',') | |
| 16 | .withQuotechar(CSVWriter.DEFAULT_QUOTE_CHARACTER) | |
| 17 | .withEscapechar(CSVWriter.DEFAULT_ESCAPE_CHARACTER) | |
| 18 | .withOrderedResults(true) | |
| 19 | .withExceptionHandler(new ExceptionHandlerIgnore()) | |
| 20 | .build(); | |
| 21 | } | |
| 22 | } | |
Mutations | ||
| 14 |
1.1 |