diff --git a/api/src/main/java/io/minio/messages/LifecycleRule.java b/api/src/main/java/io/minio/messages/LifecycleRule.java index ab338ca3a..c91773835 100644 --- a/api/src/main/java/io/minio/messages/LifecycleRule.java +++ b/api/src/main/java/io/minio/messages/LifecycleRule.java @@ -55,7 +55,7 @@ public LifecycleRule( @Nullable @Element(name = "AbortIncompleteMultipartUpload", required = false) AbortIncompleteMultipartUpload abortIncompleteMultipartUpload, @Nullable @Element(name = "Expiration", required = false) Expiration expiration, - @Nonnull @Element(name = "Filter", required = false) RuleFilter filter, + @Nullable @Element(name = "Filter", required = false) RuleFilter filter, @Nullable @Element(name = "ID", required = false) String id, @Nullable @Element(name = "NoncurrentVersionExpiration", required = false) NoncurrentVersionExpiration noncurrentVersionExpiration, @@ -81,7 +81,7 @@ public LifecycleRule( this.abortIncompleteMultipartUpload = abortIncompleteMultipartUpload; this.expiration = expiration; - this.filter = Objects.requireNonNull(filter, "Filter must not be null"); + this.filter = filter; this.id = id; this.noncurrentVersionExpiration = noncurrentVersionExpiration; this.noncurrentVersionTransition = noncurrentVersionTransition;