Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
arithmetic1728 committed Aug 17, 2021
1 parent 439dcf2 commit de1a639
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,6 @@ public abstract class AbstractServiceStubSettingsClassComposer implements ClassC

private static final String DOT = ".";

protected static final TypeStore FIXED_TYPESTORE = createStaticTypes();

protected static final VariableExpr DEFAULT_SERVICE_SCOPES_VAR_EXPR =
createDefaultServiceScopesVarExpr();
private static final VariableExpr NESTED_UNARY_METHOD_SETTINGS_BUILDERS_VAR_EXPR =
createNestedUnaryMethodSettingsBuildersVarExpr();
private static final VariableExpr NESTED_RETRYABLE_CODE_DEFINITIONS_VAR_EXPR =
Expand All @@ -150,6 +146,11 @@ public abstract class AbstractServiceStubSettingsClassComposer implements ClassC

private final TransportContext transportContext;

protected static final TypeStore FIXED_TYPESTORE = createStaticTypes();

protected static final VariableExpr DEFAULT_SERVICE_SCOPES_VAR_EXPR =
createDefaultServiceScopesVarExpr();

protected AbstractServiceStubSettingsClassComposer(TransportContext transportContext) {
this.transportContext = transportContext;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ protected MethodDefinition createDefaultCredentialsProviderBuilderMethod() {
.setArguments(DEFAULT_SERVICE_SCOPES_VAR_EXPR)
.setReturnType(returnType)
.build();

// This section is specific to GAPIC clients. It sets UseJwtAccessWithScope value to true to
// enable self signed JWT feature.
credsProviderBuilderExpr =
MethodInvocationExpr.builder()
.setExprReferenceExpr(credsProviderBuilderExpr)
Expand All @@ -122,6 +125,7 @@ protected MethodDefinition createDefaultCredentialsProviderBuilderMethod() {
PrimitiveValue.builder().setType(TypeNode.BOOLEAN).setValue("true").build()))
.setReturnType(returnType)
.build();

return MethodDefinition.builder()
.setHeaderCommentStatements(
SettingsCommentComposer.DEFAULT_CREDENTIALS_PROVIDER_BUILDER_METHOD_COMMENT)
Expand Down

0 comments on commit de1a639

Please sign in to comment.