Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

Commit 8b6e314

Browse files
committed
mark nullable
Change-Id: I62f28e98c383dbee8435ce93a10d96118c1463d6
1 parent 8764474 commit 8b6e314

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

  • google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Table.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import java.util.Map;
2828
import java.util.Map.Entry;
2929
import javax.annotation.Nonnull;
30+
import javax.annotation.Nullable;
3031
import org.threeten.bp.Duration;
3132

3233
/** Wrapper for {@link Table} protocol buffer object */
@@ -144,7 +145,7 @@ public String viewConfig() {
144145

145146
private final Duration changeStreamRetention;
146147
private final boolean deletionProtection;
147-
private final AutomatedBackupPolicy automatedBackupPolicy;
148+
@Nullable private final AutomatedBackupPolicy automatedBackupPolicy;
148149

149150
@InternalApi
150151
public static Table fromProto(@Nonnull com.google.bigtable.admin.v2.Table proto) {
@@ -191,7 +192,7 @@ private Table(
191192
List<ColumnFamily> columnFamilies,
192193
Duration changeStreamRetention,
193194
boolean deletionProtection,
194-
AutomatedBackupPolicy automatedBackupPolicy) {
195+
@Nullable AutomatedBackupPolicy automatedBackupPolicy) {
195196
this.instanceId = tableName.getInstance();
196197
this.id = tableName.getTable();
197198
this.replicationStatesByClusterId = replicationStatesByClusterId;
@@ -230,10 +231,11 @@ public boolean isDeletionProtected() {
230231

231232
/** Returns whether this table has automated backups enabled. */
232233
public boolean isAutomatedBackupEnabled() {
233-
return automatedBackupPolicy == null ? false : true;
234+
return automatedBackupPolicy != null;
234235
}
235236

236237
/** Returns the automated backup policy config. */
238+
@Nullable
237239
public AutomatedBackupPolicy getAutomatedBackupPolicy() {
238240
return automatedBackupPolicy;
239241
}

0 commit comments

Comments
 (0)