Skip to content

Conversation

therepanic
Copy link
Contributor

Since the GrantedAuthority#getAuthority contract itself implies that it can return null, we should mark it as @Nullable.

Closes: gh-17999

@therepanic
Copy link
Contributor Author

therepanic commented Oct 6, 2025

Currently, the build crashes in the docs module, and it's not entirely clear why. Can you explain please why the build crashes in the following class test?

ObtainingMoreAuthorizationTests. profileWhenMissingAuthorityConfigurationThenRedirectsToAuthorizationServer()
ObtainingMoreAuthorizationTests. profileWhenMissingAuthorityConfigurationThenRedirectsToAuthorizationServer()

Note: Now it is fixed

@therepanic therepanic force-pushed the gh-17999 branch 3 times, most recently from 54f53fc to e16ab55 Compare October 11, 2025 14:00
* precision).
*/
String getAuthority();
@Nullable String getAuthority();
Copy link
Contributor

@ronodhirSoumik ronodhirSoumik Oct 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question :: though this implementation supports null case, but it is supposed to be avoided (as per the documentation -> returning null should be avoided unless actually required. ) So dont we losing the feature/control with the overall changes?
@therepanic @rwinch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GrantedAuthority.getAuthority() should be marked @Nullable

3 participants