diff --git a/aliyun/src/test/java/org/apache/iceberg/aliyun/oss/mock/AliyunOSSMockLocalStore.java b/aliyun/src/test/java/org/apache/iceberg/aliyun/oss/mock/AliyunOSSMockLocalStore.java index cce4f32dd02b..499e61495fc0 100644 --- a/aliyun/src/test/java/org/apache/iceberg/aliyun/oss/mock/AliyunOSSMockLocalStore.java +++ b/aliyun/src/test/java/org/apache/iceberg/aliyun/oss/mock/AliyunOSSMockLocalStore.java @@ -110,7 +110,7 @@ Bucket getBucket(String bucketName) { findBucketsByFilter( file -> Files.isDirectory(file) && file.getFileName().endsWith(bucketName)); - return buckets.size() > 0 ? buckets.get(0) : null; + return !buckets.isEmpty() ? buckets.get(0) : null; } void deleteBucket(String bucketName) throws IOException {