Skip to content

TraceServiceSettings.Builder not very idiomatic #2610

Closed

Description

@joaoandremartins

I'm having to do this weird cast, which should be avoidable:

TraceServiceClient.create(
	((TraceServiceSettings.Builder) TraceServiceSettings.newBuilder()
	.setCredentialsProvider(
		StackdriverTraceAutoConfiguration.this.finalCredentialsProvider)
	.setExecutorProvider(executorProvider))
	.build())

Notice the (TraceServiceSettings.Builder) cast, because setExecutorProvider() is inherited from the abstract ClientSettings and should probably be overwritten to return a TraceServiceSettings.Builder.

Activity

  1. garrettjonesgoogle commented on Nov 10, 2017

    @garrettjonesgoogle
    Contributor

    What version of Java are you using?

  2. joaoandremartins commented on Nov 10, 2017

    @joaoandremartins
    Author

    Was using jdk1.8.0_121, though seeing the same thing with jdk1.8.0_151.

  3. garrettjonesgoogle commented on Nov 10, 2017

    @garrettjonesgoogle
    Contributor

    Also what version of gax are you using?

  4. joaoandremartins commented on Nov 13, 2017

    @joaoandremartins
    Author

    Apologies, user error. gax version was being set to 1.8.1 where it shouldn't.

  5. added 2 commits that reference this issue on Mar 24, 2026
    c8dae8f
    2de8da3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions