Skip to content

Commit

Permalink
fix!: initialize should be protected (#536)
Browse files Browse the repository at this point in the history
* fix!: iniialize should be protected

* fix: fix clirr build error
  • Loading branch information
olavloite authored Oct 22, 2020
1 parent 1811f52 commit 5c4c8c5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
17 changes: 17 additions & 0 deletions google-cloud-spanner/clirr-ignored-differences.xml
Original file line number Diff line number Diff line change
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>
Original file line number Diff line number Diff line change
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;
}
Original file line number Diff line number Diff line change
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();
}
}

0 comments on commit 5c4c8c5

Please sign in to comment.