From e1a418fecaef94f329bf7e666c4bd8e0cd9a5441 Mon Sep 17 00:00:00 2001 From: Alex | Kronox Date: Mon, 27 Nov 2023 15:39:29 +0100 Subject: [PATCH] improve text --- .../de/jplag/reporting/reportobject/ReportObjectFactory.java | 5 +++-- .../de/jplag/reporting/reportobject/writer/DummyWriter.java | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/de/jplag/reporting/reportobject/ReportObjectFactory.java b/core/src/main/java/de/jplag/reporting/reportobject/ReportObjectFactory.java index 1be304a3b..13a23cc0b 100644 --- a/core/src/main/java/de/jplag/reporting/reportobject/ReportObjectFactory.java +++ b/core/src/main/java/de/jplag/reporting/reportobject/ReportObjectFactory.java @@ -51,7 +51,8 @@ public class ReportObjectFactory { public static final String OVERVIEW_FILE_NAME = "overview.json"; public static final String README_FILE_NAME = "README.txt"; - public static final String README_CONTENT = "To view the results go to https://jplag.github.io/JPlag/ and drag the generated zip file onto the page."; + public static final String[] README_CONTENT = new String[] {"This is a software plagiarism report generated by JPlag.", + "To view the results go to https://jplag.github.io/JPlag/ and drag the generated zip file onto the page."}; public static final String SUBMISSIONS_FOLDER = "files"; public static final String SUBMISSION_FILE_INDEX_FILE_NAME = "submissionFileIndex.json"; @@ -205,7 +206,7 @@ private void writeOverview(JPlagResult result, String path) { } private void writeReadMeFile(String path) { - new TextWriter().writeFile(README_CONTENT, path, README_FILE_NAME); + new TextWriter().writeFile(String.join(System.lineSeparator(), README_CONTENT), path, README_FILE_NAME); } private void writeSubmissionIndexFile(JPlagResult result, String path) { diff --git a/core/src/main/java/de/jplag/reporting/reportobject/writer/DummyWriter.java b/core/src/main/java/de/jplag/reporting/reportobject/writer/DummyWriter.java index 92258482f..c344802dc 100644 --- a/core/src/main/java/de/jplag/reporting/reportobject/writer/DummyWriter.java +++ b/core/src/main/java/de/jplag/reporting/reportobject/writer/DummyWriter.java @@ -3,6 +3,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/** + * This writer is used as a mock for testing purposes only. + */ public class DummyWriter extends JsonWriter { private static final Logger logger = LoggerFactory.getLogger(DummyWriter.class); private static final String MESSAGE = "DummyWriter writes object {} to path {} with name {} as JSON.";