-
Task
-
Resolution: Done
-
L3 - Default
-
None
-
None
Right now, we have several places where we actually need to find out which kind of combined report is on hand. For instance and excerpt of the CombinedReportResult:
public List<String[]> getResultAsCsv(final Integer limit, final Integer offset, Set<String> excludedColumns) { Optional firstResultOptional = reportResultDto.getResult().values().stream().findFirst(); List<String[]> csvStrings; if (firstResultOptional.isPresent()) { Object firstResult = firstResultOptional.get(); if (firstResult instanceof ProcessReportMapResultDto) { CombinedProcessReportResultDto<ProcessReportMapResultDto> combinedResult = (CombinedProcessReportResultDto<ProcessReportMapResultDto>) reportResultDto; csvStrings = mapCombinedMapResultToCsv(limit, offset, combinedResult); } // .....
Instead of going through the result itself and we should be able to infer the type directly.