GoogleCloudPlatform / ide-login

The plugins-login-common library for authenticating with the Google Cloud Platform shared by several IDE plugins including Google Cloud Tools for Eclipse, Google Cloud Tools for IntelliJ, and Android Studio.
Apache License 2.0
2 stars 9 forks source link

Define null OAuthData #15

Closed akerekes closed 7 years ago

akerekes commented 8 years ago

OAuthDataStore contract relies on having loadOAuthData returning an object with null fields in case no persisted one exists:

https://github.com/GoogleCloudPlatform/ide-login/blob/master/src/main/java/com/google/cloud/tools/ide/login/OAuthDataStore.java#L37

It'd be a better interface to have OAuthData define a constant for the null OAuthData instance and use that in comparisons.

chanseokoh commented 7 years ago

Not relevant anymore. It's returning a Set.