mirror of https://github.com/apache/druid.git
TaskActionToolbox: Combine adjacent ifs
This commit is contained in:
parent
f86342f7dc
commit
0ff7f0e8e0
|
@ -76,13 +76,9 @@ public class TaskActionToolbox
|
||||||
Preconditions.checkArgument(!segments.isEmpty(), "segments nonempty");
|
Preconditions.checkArgument(!segments.isEmpty(), "segments nonempty");
|
||||||
final DataSegment firstSegment = segments.iterator().next();
|
final DataSegment firstSegment = segments.iterator().next();
|
||||||
for (final DataSegment segment : segments) {
|
for (final DataSegment segment : segments) {
|
||||||
if (!segment.getDataSource().equals(firstSegment.getDataSource())) {
|
if (!segment.getDataSource().equals(firstSegment.getDataSource())
|
||||||
return false;
|
|| !segment.getInterval().equals(firstSegment.getInterval())
|
||||||
}
|
|| !segment.getVersion().equals(firstSegment.getVersion())) {
|
||||||
if (!segment.getInterval().equals(firstSegment.getInterval())) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!segment.getVersion().equals(firstSegment.getVersion())) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue