Environment details
When using the library, I found a bug in the UserCredentials#ToBuilder()
It's not calling super and therefore we lost the access token
Steps to reproduce
UserCredentialsTest.java
@Test
public void toBuilder() throws IOException {
final URI tokenServer1 = URI.create("https://foo1.com/bar");
AccessToken accessToken = new AccessToken(ACCESS_TOKEN, null);
MockHttpTransportFactory httpTransportFactory = new MockHttpTransportFactory();
UserCredentials credentials =
UserCredentials.newBuilder()
.setClientId(CLIENT_ID)
.setClientSecret(CLIENT_SECRET)
.setRefreshToken(REFRESH_TOKEN)
.setAccessToken(accessToken)
.setHttpTransportFactory(httpTransportFactory)
.setTokenServerUri(tokenServer1)
.build();
credentials.toBuilder().build();
UserCredentials otherCredentials = credentials.toBuilder().build();
assertEquals(credentials, otherCredentials);
}
Will shortly provide a PR for this
Environment details
When using the library, I found a bug in the UserCredentials#ToBuilder()
It's not calling super and therefore we lost the access token
Steps to reproduce
Will shortly provide a PR for this