Skip to content

Commit 5f50e46

Browse files
committed
Make fields private + add javadoc
1 parent 6694ff8 commit 5f50e46

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

core/profiles/src/main/java/software/amazon/awssdk/profiles/internal/AggregateProfileFileSupplier.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
*/
3333
@SdkInternalApi
3434
public class AggregateProfileFileSupplier implements ProfileFileSupplier {
35-
final List<ProfileFileSupplier> suppliers;
35+
private final List<ProfileFileSupplier> suppliers;
3636

3737
// supplier values and the resulting aggregate must always be updated atomically together
38-
final AtomicReference<SupplierState> state =
38+
private final AtomicReference<SupplierState> state =
3939
new AtomicReference<>(new SupplierState(Collections.emptyMap(), null));
4040

4141
public AggregateProfileFileSupplier(ProfileFileSupplier... suppliers) {
@@ -88,9 +88,13 @@ private Map<Supplier<ProfileFile>, ProfileFile> changedSupplierValues(Map<Suppli
8888
return changedValues;
8989
}
9090

91+
/**
92+
* Supplier values and the resulting aggregate must always be updated atomically together.
93+
* This record class tracks all mutable elements of the supplier's state together.
94+
*/
9195
private static final class SupplierState {
92-
final Map<Supplier<ProfileFile>, ProfileFile> values;
93-
final ProfileFile aggregate;
96+
private final Map<Supplier<ProfileFile>, ProfileFile> values;
97+
private final ProfileFile aggregate;
9498

9599
private SupplierState(Map<Supplier<ProfileFile>, ProfileFile> values, ProfileFile aggregate) {
96100
this.values = values;

0 commit comments

Comments
 (0)