CPD Results

The following document contains the results of PMD's CPD 6.28.0.

Duplications

File Line
org/woehlke/bloodmoney/measurements/BloodPressureMeasurementControllerExport.java 28
org/woehlke/bloodmoney/measurements/BloodPressureMeasurementControllerExport.java 45
    public void exportCSV(HttpServletResponse response) throws Exception  {
        //set file name and content type
        response.setContentType("text/csv");
        response.setHeader(HttpHeaders.CONTENT_DISPOSITION,
            "attachment; filename=\"" + this.bloodMoneyProperties.getWebConfig().getExportFilename() + "\"");
        //create a csv writer
        StatefulBeanToCsv<BloodPressureMeasurementEntity> writer = new StatefulBeanToCsvBuilder<BloodPressureMeasurementEntity>(response.getWriter())
            .withQuotechar(CSVWriter.NO_QUOTE_CHARACTER)
            .withSeparator(this.bloodMoneyProperties.getWebConfig().getExportFilenameSeparator().charAt(0))
            .withOrderedResults(false)
            .build();
        //write all Measurements to csv file
        writer.write(bloodPressureMeasurementService.getAll());
    }

    @GetMapping("/all/xml")
File Line
org/woehlke/bloodmoney/measurements/BloodPressureMeasurementControllerExport.java 28
org/woehlke/bloodmoney/measurements/BloodPressureMeasurementControllerExport.java 45
org/woehlke/bloodmoney/measurements/BloodPressureMeasurementControllerExport.java 62
    public void exportCSV(HttpServletResponse response) throws Exception  {
        //set file name and content type
        response.setContentType("text/csv");
        response.setHeader(HttpHeaders.CONTENT_DISPOSITION,
            "attachment; filename=\"" + this.bloodMoneyProperties.getWebConfig().getExportFilename() + "\"");
        //create a csv writer
        StatefulBeanToCsv<BloodPressureMeasurementEntity> writer = new StatefulBeanToCsvBuilder<BloodPressureMeasurementEntity>(response.getWriter())
            .withQuotechar(CSVWriter.NO_QUOTE_CHARACTER)
            .withSeparator(this.bloodMoneyProperties.getWebConfig().getExportFilenameSeparator().charAt(0))
            .withOrderedResults(false)
            .build();
        //write all Measurements to csv file
        writer.write(bloodPressureMeasurementService.getAll());
    }