package com.boissinot.jenkins.csvexporter.batch;

import org.springframework.batch.item.file.FlatFileHeaderCallback;

import java.io.IOException;
import java.io.Writer;

/**
 * @author Gregory Boissinot
 */
public class FlatFileItemWriterHeaderCallback implements FlatFileHeaderCallback {

    public String[] labels;

    public void setLabels(String[] labels) {
        this.labels = labels;
    }

    public void writeHeader(Writer writer) throws IOException {
        StringBuilder stringBuilder = new StringBuilder();
        for (String label : labels) {
            stringBuilder.append(";");
            stringBuilder.append(label);
        }
        stringBuilder.delete(0, 1);
        writer.append(stringBuilder.toString());
    }
}

@@ -394,16 +394,30 @@
 %0A    %7D%0A%0A
+    @Override%0A
     publ

Add @Override