From 5b07ed93a40648afb2acac8a220ed3c314b5294d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Dom=C3=ADnguez=20Dorado?= Date: Sun, 13 Feb 2022 19:14:07 +0100 Subject: [PATCH] mjson seems to be abandoned, so it has been replaced by everit-json-schema --- .../java/com/manolodominguez/openlrae/cli/CLIHandler.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/manolodominguez/openlrae/cli/CLIHandler.java b/src/main/java/com/manolodominguez/openlrae/cli/CLIHandler.java index edffa56..fa7251b 100644 --- a/src/main/java/com/manolodominguez/openlrae/cli/CLIHandler.java +++ b/src/main/java/com/manolodominguez/openlrae/cli/CLIHandler.java @@ -61,6 +61,7 @@ import java.net.URL; import java.util.Locale; import java.util.ResourceBundle; +import org.json.JSONException; import org.slf4j.LoggerFactory; /** @@ -167,8 +168,8 @@ public void runAnalysis(String fileName) { // Print analysis report. As a JSON string in this case. writeToConsole(""); - writeToConsole(ReportsFactory.getInstance(SupportedVerbosityLevel.DETAILED).getReportAsPlainText(project, resultSet)); - } catch (MalformedURLException ex) { + writeToConsole(ReportsFactory.getInstance(SupportedVerbosityLevel.DETAILED).getReportAsBeautifiedJSONString(project, resultSet)); + } catch (MalformedURLException | JSONException | IllegalArgumentException ex) { writeToConsole(ownI18N.getString(NOT_A_VALID_JSON_1) + " " + fileName + ". " + ownI18N.getString(NOT_A_VALID_JSON_2)); } }