package com.hartwig.healthchecks.common.report;

import java.util.Optional;

import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.hartwig.healthchecks.common.exception.GenerateReportException;
import com.hartwig.healthchecks.common.util.PropertiesUtil;

import org.jetbrains.annotations.NotNull;

public final class StandardOutputReport extends AbstractJsonBaseReport {

    private static final StandardOutputReport INSTANCE = new StandardOutputReport();

    private StandardOutputReport() {
    }

    public static StandardOutputReport getInstance() {
        return INSTANCE;
    }

    @NotNull
    @Override
    public Optional<String> generateReport(final String runDirectory) throws GenerateReportException {
        final PropertiesUtil propertiesUtil = PropertiesUtil.getInstance();
        final JsonArray reportArray = computeElements(runDirectory);

        final JsonObject reportJson = new JsonObject();
        reportJson.add("health_checks", reportArray);

        return Optional.ofNullable(GSON.toJson(reportJson));
    }
}

@@ -216,68 +216,8 @@
 ion;
-%0Aimport com.hartwig.healthchecks.common.util.PropertiesUtil;
 %0A%0Aim
@@ -682,84 +682,8 @@
 n %7B%0A
-        final PropertiesUtil propertiesUtil = PropertiesUtil.getInstance();%0A
     

Remove unused variable