Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: initialize should be protected #536

Merged
merged 2 commits into from Oct 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions google-cloud-spanner/clirr-ignored-differences.xml
Expand Up @@ -377,4 +377,21 @@
<className>com/google/cloud/spanner/AsyncTransactionManager</className>
<method>com.google.api.core.ApiFuture closeAsync()</method>
</difference>

<!-- Note: The following change for the LazySpannerInitializer.initialize() method must be specified twice, both with return type java.lang.Object and with com.google.cloud.spanner.Spanner. -->
<difference>
<differenceType>7009</differenceType>
<className>com/google/cloud/spanner/LazySpannerInitializer</className>
<method>com.google.cloud.spanner.Spanner initialize()</method>
</difference>
<difference>
<differenceType>7009</differenceType>
<className>com/google/cloud/spanner/LazySpannerInitializer</className>
<method>java.lang.Object initialize()</method>
</difference>
<difference>
<differenceType>7009</differenceType>
<className>com/google/cloud/spanner/AbstractLazyInitializer</className>
<method>java.lang.Object initialize()</method>
</difference>
</differences>
Expand Up @@ -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;
}
Expand Up @@ -23,7 +23,7 @@ public class LazySpannerInitializer extends AbstractLazyInitializer<Spanner> {
* custom configuration.
*/
@Override
public Spanner initialize() throws Exception {
protected Spanner initialize() throws Exception {
return SpannerOptions.newBuilder().build().getService();
}
}