Skip to content

Commit

Permalink
Revert "Allow null filter in LifecycleRule (#1344)" (#1345)
Browse files Browse the repository at this point in the history
This reverts commit f8de495.

There is a bug in `mc ilm export` not showing empty filter.

Signed-off-by: Bala.FA <[email protected]>
  • Loading branch information
balamurugana committed Jul 9, 2022
1 parent fdebb10 commit 65f5ffe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/src/main/java/io/minio/messages/LifecycleRule.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public LifecycleRule(
@Nullable @Element(name = "AbortIncompleteMultipartUpload", required = false)
AbortIncompleteMultipartUpload abortIncompleteMultipartUpload,
@Nullable @Element(name = "Expiration", required = false) Expiration expiration,
@Nullable @Element(name = "Filter", required = false) RuleFilter filter,
@Nonnull @Element(name = "Filter", required = false) RuleFilter filter,
@Nullable @Element(name = "ID", required = false) String id,
@Nullable @Element(name = "NoncurrentVersionExpiration", required = false)
NoncurrentVersionExpiration noncurrentVersionExpiration,
Expand All @@ -81,7 +81,7 @@ public LifecycleRule(

this.abortIncompleteMultipartUpload = abortIncompleteMultipartUpload;
this.expiration = expiration;
this.filter = filter;
this.filter = Objects.requireNonNull(filter, "Filter must not be null");
this.id = id;
this.noncurrentVersionExpiration = noncurrentVersionExpiration;
this.noncurrentVersionTransition = noncurrentVersionTransition;
Expand Down

0 comments on commit 65f5ffe

Please sign in to comment.