Skip to content

Commit

Permalink
[ISSUE #8810] mr/*: replaced .size() > 0 with isEmpty()
Browse files Browse the repository at this point in the history
  • Loading branch information
PickBas committed Oct 12, 2023
1 parent 6530a3e commit 39f5ba6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public void abortJob(JobContext originalContext, int status) throws IOException
dataFiles(fileExecutor, table.location(), jobContext, table.io(), false);

// Check if we have files already committed and remove data files if there are any
if (dataFiles.size() > 0) {
if (!dataFiles.isEmpty()) {
Tasks.foreach(dataFiles)
.retry(3)
.suppressFailureWhenFinished()
Expand Down Expand Up @@ -327,7 +327,7 @@ private void commitTable(

Collection<DataFile> dataFiles = dataFiles(executor, location, jobContext, io, true);

if (dataFiles.size() > 0) {
if (!dataFiles.isEmpty()) {
// Appending data files to the table
AppendFiles append = table.newAppend();
dataFiles.forEach(append::appendFile);
Expand Down

0 comments on commit 39f5ba6

Please sign in to comment.