File tree Expand file tree Collapse file tree
main/java/com/google/gcloud/storage
test/java/com/google/gcloud/storage Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -453,7 +453,7 @@ public Builder notFoundPage(String notFoundPage) {
453453 }
454454
455455 public Builder deleteRules (Iterable <? extends DeleteRule > rules ) {
456- this .deleteRules = ImmutableList .copyOf (rules );
456+ this .deleteRules = rules != null ? ImmutableList .copyOf (rules ) : null ;
457457 return this ;
458458 }
459459
Original file line number Diff line number Diff line change @@ -90,6 +90,12 @@ public void testToBuilder() {
9090 compareBuckets (BUCKET_INFO , bucketInfo );
9191 }
9292
93+ @ Test
94+ public void testToBuilderIncomplete () {
95+ BucketInfo incompleteBucketInfo = BucketInfo .builder ("b" ).build ();
96+ assertEquals (incompleteBucketInfo .name (), incompleteBucketInfo .toBuilder ().build ().name ());
97+ }
98+
9399 @ Test
94100 public void testOf () {
95101 BucketInfo bucketInfo = BucketInfo .of ("bucket" );
You can’t perform that action at this time.
0 commit comments