@@ -111,6 +111,7 @@ public static class AutomatedBackupPolicy {
111111 @ InternalApi
112112 public static AutomatedBackupPolicy fromProto (
113113 com .google .bigtable .admin .v2 .Table .AutomatedBackupPolicy proto ) {
114+ Preconditions .checkNotNull (proto );
114115 return new AutomatedBackupPolicy (proto );
115116 }
116117
@@ -143,7 +144,7 @@ public String viewConfig() {
143144
144145 private final Duration changeStreamRetention ;
145146 private final boolean deletionProtection ;
146- private static AutomatedBackupPolicy automatedBackupPolicy ;
147+ private final AutomatedBackupPolicy automatedBackupPolicy ;
147148
148149 @ InternalApi
149150 public static Table fromProto (@ Nonnull com .google .bigtable .admin .v2 .Table proto ) {
@@ -170,10 +171,9 @@ public static Table fromProto(@Nonnull com.google.bigtable.admin.v2.Table proto)
170171 proto .getChangeStreamConfig ().getRetentionPeriod ().getNanos ());
171172 }
172173
174+ AutomatedBackupPolicy automatedBackupPolicy = null ;
173175 if (proto .hasAutomatedBackupPolicy ()) {
174176 automatedBackupPolicy = AutomatedBackupPolicy .fromProto (proto .getAutomatedBackupPolicy ());
175- } else {
176- automatedBackupPolicy = null ;
177177 }
178178
179179 return new Table (
@@ -198,7 +198,7 @@ private Table(
198198 this .columnFamilies = columnFamilies ;
199199 this .changeStreamRetention = changeStreamRetention ;
200200 this .deletionProtection = deletionProtection ;
201- Table .automatedBackupPolicy = automatedBackupPolicy ;
201+ this .automatedBackupPolicy = automatedBackupPolicy ;
202202 }
203203
204204 /** Gets the table's id. */
@@ -253,7 +253,7 @@ public boolean equals(Object o) {
253253 && Objects .equal (columnFamilies , table .columnFamilies )
254254 && Objects .equal (changeStreamRetention , table .changeStreamRetention )
255255 && Objects .equal (deletionProtection , table .deletionProtection )
256- && Objects .equal (automatedBackupPolicy , Table .automatedBackupPolicy );
256+ && Objects .equal (automatedBackupPolicy , table .automatedBackupPolicy );
257257 }
258258
259259 @ Override
0 commit comments