diff --git a/google-cloud-spanner/clirr-ignored-differences.xml b/google-cloud-spanner/clirr-ignored-differences.xml index 1f7beb76e9a..b68f50d78ea 100644 --- a/google-cloud-spanner/clirr-ignored-differences.xml +++ b/google-cloud-spanner/clirr-ignored-differences.xml @@ -377,4 +377,21 @@ com/google/cloud/spanner/AsyncTransactionManager com.google.api.core.ApiFuture closeAsync() + + + + 7009 + com/google/cloud/spanner/LazySpannerInitializer + com.google.cloud.spanner.Spanner initialize() + + + 7009 + com/google/cloud/spanner/LazySpannerInitializer + java.lang.Object initialize() + + + 7009 + com/google/cloud/spanner/AbstractLazyInitializer + java.lang.Object initialize() + diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractLazyInitializer.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractLazyInitializer.java index 0b1a4b3fc28..bc595b14662 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractLazyInitializer.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractLazyInitializer.java @@ -51,5 +51,5 @@ public T get() throws Exception { * Initializes the actual object that should be returned. Is called once the first time an * instance of T is required. */ - public abstract T initialize() throws Exception; + protected abstract T initialize() throws Exception; } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/LazySpannerInitializer.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/LazySpannerInitializer.java index a157a5ac3ff..009c276751e 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/LazySpannerInitializer.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/LazySpannerInitializer.java @@ -23,7 +23,7 @@ public class LazySpannerInitializer extends AbstractLazyInitializer { * custom configuration. */ @Override - public Spanner initialize() throws Exception { + protected Spanner initialize() throws Exception { return SpannerOptions.newBuilder().build().getService(); } }