adoroszlai opened a new pull request, #6205:
URL: https://github.com/apache/ozone/pull/6205
## What changes were proposed in this pull request?
Fix findbugs warnings by making `BucketArgs` immutable. See #6193 for
similar change in `VolumeArgs`.
```
M V EI: org.apache.hadoop.ozone.client.BucketArgs.getAcls() may expose
internal representation by returning BucketArgs.acls At BucketArgs.java:[line
130]
M V EI: org.apache.hadoop.ozone.client.BucketArgs.getMetadata() may expose
internal representation by returning BucketArgs.metadata At
BucketArgs.java:[line 139]
M V EI2: org.apache.hadoop.ozone.client.BucketArgs$Builder.setAcls(List) may
expose internal representation by storing an externally mutable object into
BucketArgs$Builder.acls At BucketArgs.java:[line 239]
```
Also eliminate `@SuppressWarnings("parameternumber")` by passing the builder
to the constructor, instead of individual properties.
Create new constructor in `OzoneAcl` to simplify instantiation with multiple
`ACLType` (avoid the need to mess with `BitSet`).
https://issues.apache.org/jira/browse/HDDS-10325
## How was this patch tested?
```
$ hadoop-ozone/dev-support/checks/findbugs.sh -Dspotbugs.version=4.8.3.0
$ grep -c 'client.BucketArgs' target/findbugs/summary.txt
0
```
CI:
https://github.com/adoroszlai/ozone/actions/runs/7843743627
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]