Skip to content

Commit 53e26ff

Browse files
committed
fix(large-messages): wrap getAllowedBuckets() return in unmodifiableSet
Avoid exposing the internal set reference (SpotBugs EI_EXPOSE_REP).
1 parent 09bfb38 commit 53e26ff

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

powertools-large-messages/src/main/java/software/amazon/lambda/powertools/largemessages/LargeMessageConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public void withAllowedBuckets(Set<String> allowedBuckets) {
101101
* @return the (unmodifiable) set of allowed bucket names, never null
102102
*/
103103
public Set<String> getAllowedBuckets() {
104-
return allowedBuckets;
104+
return Collections.unmodifiableSet(allowedBuckets);
105105
}
106106

107107
// For tests purpose

0 commit comments

Comments
 (0)