Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

Commit abe0325

Browse files
feat!: Java 8 breaking generator changes (#453)
* chore: release gapic-generator-java v1.0.17 Committer: @miraleung PiperOrigin-RevId: 388499329 Source-Author: Google APIs <noreply@google.com> Source-Date: Tue Aug 3 11:12:29 2021 -0700 Source-Repo: googleapis/googleapis Source-Sha: bb0a090d9204110042ab5dee2ce9e06e8071ce54 Source-Link: googleapis/googleapis@bb0a090 * feat!: release gapic-generator-java v2.0.0 Committer: @miraleung PiperOrigin-RevId: 388535346 Source-Author: Google APIs <noreply@google.com> Source-Date: Tue Aug 3 13:48:38 2021 -0700 Source-Repo: googleapis/googleapis Source-Sha: d9eaf41de44d953458b18712a3f240bb4c564e48 Source-Link: googleapis/googleapis@d9eaf41
1 parent 3ab6abc commit abe0325

File tree

5 files changed

+97
-173
lines changed

5 files changed

+97
-173
lines changed

google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/ReservationServiceClient.java

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.google.cloud.bigquery.reservation.v1;
1818

19-
import com.google.api.core.ApiFunction;
2019
import com.google.api.core.ApiFuture;
2120
import com.google.api.core.ApiFutures;
2221
import com.google.api.core.BetaApi;
@@ -2838,12 +2837,7 @@ public static ApiFuture<ListReservationsPagedResponse> createAsync(
28382837
ListReservationsPage.createEmptyPage().createPageAsync(context, futureResponse);
28392838
return ApiFutures.transform(
28402839
futurePage,
2841-
new ApiFunction<ListReservationsPage, ListReservationsPagedResponse>() {
2842-
@Override
2843-
public ListReservationsPagedResponse apply(ListReservationsPage input) {
2844-
return new ListReservationsPagedResponse(input);
2845-
}
2846-
},
2840+
input -> new ListReservationsPagedResponse(input),
28472841
MoreExecutors.directExecutor());
28482842
}
28492843

@@ -2922,12 +2916,7 @@ public static ApiFuture<ListCapacityCommitmentsPagedResponse> createAsync(
29222916
ListCapacityCommitmentsPage.createEmptyPage().createPageAsync(context, futureResponse);
29232917
return ApiFutures.transform(
29242918
futurePage,
2925-
new ApiFunction<ListCapacityCommitmentsPage, ListCapacityCommitmentsPagedResponse>() {
2926-
@Override
2927-
public ListCapacityCommitmentsPagedResponse apply(ListCapacityCommitmentsPage input) {
2928-
return new ListCapacityCommitmentsPagedResponse(input);
2929-
}
2930-
},
2919+
input -> new ListCapacityCommitmentsPagedResponse(input),
29312920
MoreExecutors.directExecutor());
29322921
}
29332922

@@ -3013,12 +3002,7 @@ public static ApiFuture<ListAssignmentsPagedResponse> createAsync(
30133002
ListAssignmentsPage.createEmptyPage().createPageAsync(context, futureResponse);
30143003
return ApiFutures.transform(
30153004
futurePage,
3016-
new ApiFunction<ListAssignmentsPage, ListAssignmentsPagedResponse>() {
3017-
@Override
3018-
public ListAssignmentsPagedResponse apply(ListAssignmentsPage input) {
3019-
return new ListAssignmentsPagedResponse(input);
3020-
}
3021-
},
3005+
input -> new ListAssignmentsPagedResponse(input),
30223006
MoreExecutors.directExecutor());
30233007
}
30243008

@@ -3095,12 +3079,7 @@ public static ApiFuture<SearchAssignmentsPagedResponse> createAsync(
30953079
SearchAssignmentsPage.createEmptyPage().createPageAsync(context, futureResponse);
30963080
return ApiFutures.transform(
30973081
futurePage,
3098-
new ApiFunction<SearchAssignmentsPage, SearchAssignmentsPagedResponse>() {
3099-
@Override
3100-
public SearchAssignmentsPagedResponse apply(SearchAssignmentsPage input) {
3101-
return new SearchAssignmentsPagedResponse(input);
3102-
}
3103-
},
3082+
input -> new SearchAssignmentsPagedResponse(input),
31043083
MoreExecutors.directExecutor());
31053084
}
31063085

google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/ReservationServiceSettings.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,14 +272,13 @@ public ReservationServiceStubSettings.Builder getStubSettingsBuilder() {
272272
return ((ReservationServiceStubSettings.Builder) getStubSettings());
273273
}
274274

275-
// NEXT_MAJOR_VER: remove 'throws Exception'.
276275
/**
277276
* Applies the given settings updater function to all of the unary API methods in this service.
278277
*
279278
* <p>Note: This method does not support applying settings to streaming methods.
280279
*/
281280
public Builder applyToAllUnaryMethods(
282-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
281+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
283282
super.applyToAllUnaryMethods(
284283
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
285284
return this;

0 commit comments

Comments
 (0)