Skip to content

Commit

Permalink
Fixing issues with sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
baubakg committed Oct 7, 2023
1 parent d914b73 commit b8e77ff
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -439,15 +439,17 @@ public boolean isEntryPresent(Map<String, Object> in_searchKeyValues) {
* @return a CSV file containing the LogData
*/
public File exportLogDataToCSV() throws LogDataExportToFileException {
if (this.getEntries().keySet().isEmpty()) {
Optional<T> l_firstEntry = this.getEntries().values().stream().findFirst();

if (l_firstEntry.isPresent()) {
return exportLogDataToCSV(l_firstEntry.get().fetchStoredHeaders(), l_firstEntry.get().getParseDefinition()
.fetchEscapedTitle()
+ "-export.csv");
} else {
log.warn("No Log data to export. Please load the log data before re-attempting");
return new File("Non-ExistingFile");
}

StdLogEntry l_parseDefinition = this.getEntries().values().stream().findFirst().get();
return exportLogDataToCSV(l_parseDefinition.fetchStoredHeaders(), l_parseDefinition.getParseDefinition()
.fetchEscapedTitle()
+ "-export.csv");
}

/**
Expand Down

0 comments on commit b8e77ff

Please sign in to comment.