Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.logging.Logger;

/**
* Google Storage bucket metadata;
Expand Down Expand Up @@ -101,6 +102,8 @@ public com.google.api.services.storage.model.Bucket apply(BucketInfo bucketInfo)
private final String locationType;
private final Logging logging;

private static final Logger log = Logger.getLogger(BucketInfo.class.getName());

/**
* The Bucket's IAM Configuration.
*
Expand Down Expand Up @@ -356,9 +359,11 @@ public LifecycleRule(LifecycleAction action, LifecycleCondition condition) {
&& condition.getNoncurrentTimeBefore() == null
&& condition.getCustomTimeBefore() == null
&& condition.getDaysSinceCustomTime() == null) {
throw new IllegalArgumentException(
"You must specify at least one condition to use object lifecycle "
+ "management. Please see https://cloud.google.com/storage/docs/lifecycle for details.");
log.warning(
"Creating a lifecycle condition with no supported conditions:\n"
+ this
+ "\nAttempting to update with this rule may cause errors. Please update "
+ " to the latest version of google-cloud-storage");
}

this.lifecycleAction = action;
Expand Down