Skip to content

ClientRegistration.Builder.tokenUri() should take a URI parameter, not a String #17424

Open
@walles

Description

@walles

Expected Behavior

ClientRegistration.Builder.tokenUri() accepts a URI as its parameter.

		public Builder tokenUri(URI tokenUri) {  // <- Note the data type of the parameter
			this.tokenUri = tokenUri;
			return this;
		}

Current Behavior

ClientRegistration.Builder.tokenUri() accepts 🚨 a String as its tokenUri parameter.

public Builder tokenUri(String tokenUri) {
this.tokenUri = tokenUri;
return this;
}

Context

We accidentally sent the wrong parameter to ClientRegistration.Builder.tokenUri().

This cost us troubleshooting time.

If tokenUri() had required a URI rather than a String, the compiler would have caught this, saving us troubleshooting time.

Note that this would be an API breaking change, so I'm guessing this fix would have to wait for v7.

Note also that some related fields / methods should also get their types fixed accordingly. At least in this file, but potentially elsewhere in the project as well.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions