Skip to content

Commit

Permalink
kovaloid#161 Empty line at the top of Issues_DataSet.txt file removed
Browse files Browse the repository at this point in the history
kovaloid#167 NPE because of blank description field fixed
  • Loading branch information
Prokhorovmax committed May 17, 2021
1 parent e40ffe3 commit 1db5562
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ public void create() throws IOException {
if (descriptionWriter != null) {
descriptionWriter.print(issue.getKey());
descriptionWriter.print(SEPARATOR);
descriptionWriter.println(TextUtil.simplify(issue.getDescription()));
String descriptionText = issue.getDescription();
if (descriptionText != null) {
descriptionWriter.println(TextUtil.simplify(descriptionText));
} else {
descriptionWriter.println("No description");
}
}
if (commentsWriter != null && !issue.getComments().isEmpty()) {
commentsWriter.print(issue.getKey());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public void create() throws IOException {
try (FileOutputStream fos = new FileOutputStream(dataSetFile, true);
OutputStreamWriter output = new OutputStreamWriter(fos, StandardCharsets.UTF_8);
BufferedWriter writer = new BufferedWriter(output)) {
writer.newLine();
writeIssues(output, writer);
}
LOGGER.info("Data set file was updated: {}", dataSetFile.getCanonicalPath());
Expand Down

0 comments on commit 1db5562

Please sign in to comment.