Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public Set<String> getLogFileList() throws TException {
public List<String> getLogFileContentByDate(String date) throws TException {
ThriftClients thriftClients = new ThriftClients();
UserService.Iface userClient = thriftClients.makeUserClient();
if (isValidDate(date)) {
if (!isValidDate(date)) {
throw new SW360Exception("Invalid date time format, must be: yyyy-MM-dd");
}
try {
Expand All @@ -142,7 +142,7 @@ public List<String> getLogFileContentByDate(String date) throws TException {
}

private static boolean isValidDate(String dateStr) {
if (CommonUtils.isNotNullEmptyOrWhitespace(dateStr)) {
if (CommonUtils.isNullEmptyOrWhitespace(dateStr)) {
return false;
}
final String DATE_FORMAT = "yyyy-MM-dd";
Expand Down
Loading