Skip to content

Commit

Permalink
Address PR comments and linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sydney-munro committed May 16, 2022
1 parent 412337f commit 5a7b24f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -701,10 +701,10 @@ public Integer getDaysSinceCustomTime() {
}

public List<String> getMatchesPrefix() {
return matchesPrefix;
return matchesPrefix;
}

public List<String> getMatchesSuffix() {
public List<String> getMatchesSuffix() {
return matchesSuffix;
}

Expand Down Expand Up @@ -820,22 +820,20 @@ public Builder setDaysSinceCustomTime(Integer daysSinceCustomTime) {
}

/**
* Sets the list of prefixes.
* If any prefix matches the beginning of the object’s name,
* this portion of the condition is satisfied for that object.
* Sets the list of prefixes. If any prefix matches the beginning of the object’s name, this
* portion of the condition is satisfied for that object.
*/
public Builder setMatchesPrefix(List<String> matchesPrefix) {
this.matchesPrefix = matchesPrefix;
this.matchesPrefix = matchesPrefix != null ? ImmutableList.copyOf(matchesPrefix) : null;
return this;
}

/**
* Sets the list of suffixes.
* If any suffix matches the end of the object’s name,
* this portion of the condition is satisfied for that object.
* Sets the list of suffixes. If any suffix matches the end of the object’s name, this
* portion of the condition is satisfied for that object.
*/
public Builder setMatchesSuffix(List<String> matchesSuffix) {
this.matchesSuffix = matchesSuffix;
this.matchesSuffix = matchesSuffix != null ? ImmutableList.copyOf(matchesSuffix) : null;
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ public void testLifecycleRules() {
assertEquals(StorageClass.COLDLINE.toString(), lifecycleRule.getAction().getStorageClass());
assertEquals(30, lifecycleRule.getCondition().getDaysSinceCustomTime().intValue());
assertNotNull(lifecycleRule.getCondition().getCustomTimeBefore());
assertEquals("prefix-",lifecycleRule.getCondition().getMatchesPrefix().get(0));
assertEquals("prefix-", lifecycleRule.getCondition().getMatchesPrefix().get(0));
assertEquals("-suffix", lifecycleRule.getCondition().getMatchesSuffix().get(0));

Rule unsupportedRule =
Expand Down

0 comments on commit 5a7b24f

Please sign in to comment.