Skip to content

Commit

Permalink
Fix IntelliJ complaint due to negated if condition
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosen committed Jul 6, 2015
1 parent 1db845a commit 82bb0ec
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@ public void insertRecord(

public UnsafeSorterIterator getSortedIterator() throws IOException {
final UnsafeSorterIterator inMemoryIterator = sorter.getSortedIterator();
if (!spillWriters.isEmpty()) {
if (spillWriters.isEmpty()) {
return inMemoryIterator;
} else {
final UnsafeSorterSpillMerger spillMerger =
new UnsafeSorterSpillMerger(recordComparator, prefixComparator);
for (UnsafeSorterSpillWriter spillWriter : spillWriters) {
Expand All @@ -276,8 +278,6 @@ public UnsafeSorterIterator getSortedIterator() throws IOException {
spillMerger.addSpill(inMemoryIterator);
}
return spillMerger.getSortedIterator();
} else {
return inMemoryIterator;
}
}
}

0 comments on commit 82bb0ec

Please sign in to comment.