Skip to content

Commit

Permalink
Rename getter bucketName() to bucket() in BucketArgs class. (minio#945)
Browse files Browse the repository at this point in the history
  • Loading branch information
balamurugana authored May 18, 2020
1 parent 17b487c commit 9ba2dd1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions api/src/main/java/io/minio/BucketArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@

/** Base argument class holds bucket name and region */
public abstract class BucketArgs extends BaseArgs {
protected String name;
protected String bucketName;
protected String region;

/** Returns bucket name */
public String bucketName() {
return name;
public String bucket() {
return bucketName;
}

/** Returns region */
public String region() {
return region;
}
Expand Down Expand Up @@ -68,14 +66,14 @@ private void validateRegion(String region) {

@Override
protected void validate(BucketArgs args) {
validateName(args.name);
validateName(args.bucketName);
validateRegion(args.region);
}

@SuppressWarnings("unchecked") // Its safe to type cast to B as B extends this class.
public B bucket(String name) {
validateName(name);
operations.add(args -> args.name = name);
operations.add(args -> args.bucketName = name);
return (B) this;
}

Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/io/minio/MinioClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -3409,7 +3409,7 @@ public void makeBucket(MakeBucketArgs args)
headerMap.put("x-amz-bucket-object-lock-enabled", "true");
}

Response response = executePut(args.bucketName(), null, region, headerMap, null, config, 0);
Response response = executePut(args.bucket(), null, region, headerMap, null, config, 0);
response.body().close();
}

Expand Down

0 comments on commit 9ba2dd1

Please sign in to comment.