diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ImmutableSegment.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ImmutableSegment.java index 02a05c89d05..c899eab5bae 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ImmutableSegment.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ImmutableSegment.java @@ -18,15 +18,11 @@ */ package org.apache.hadoop.hbase.regionserver; - -import org.apache.yetus.audience.InterfaceAudience; -import org.apache.hadoop.hbase.util.ClassSize; -import org.apache.hadoop.hbase.CellComparator; -import org.apache.hadoop.hbase.io.TimeRange; - -import java.util.ArrayList; -import java.util.Arrays; +import java.util.Collections; import java.util.List; +import org.apache.hadoop.hbase.CellComparator; +import org.apache.hadoop.hbase.util.ClassSize; +import org.apache.yetus.audience.InterfaceAudience; /** * ImmutableSegment is an abstract class that extends the API supported by a {@link Segment}, @@ -75,8 +71,7 @@ public abstract class ImmutableSegment extends Segment { } public List getAllSegments() { - List res = new ArrayList<>(Arrays.asList(this)); - return res; + return Collections.singletonList(this); } @Override