Skip to content

Added null checks and tests to constructors - #6915

Merged
jzheaux merged 1 commit into
spring-projects:masterfrom
clementkng:gh-6892-constructor-null-checks
May 29, 2019
Merged

jzheaux merged 1 commit into
spring-projects:masterfrom
clementkng:gh-6892-constructor-null-checks

Conversation

@clementkng

Copy link
Copy Markdown
Contributor

RequestKey, JaasGrantedAuthority, and SwitchUserGrantedAuthority
assume certain final members are non-null.

Issue: gh-6892

@pivotal-issuemaster

Copy link
Copy Markdown

@clementkng Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-issuemaster

Copy link
Copy Markdown

@clementkng Thank you for signing the Contributor License Agreement!

@jzheaux jzheaux left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@clementkng thanks for the PR! I've left one piece of feedback inline.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for adding these tests. For consistency with other tests in the codebase, would you please change the way you are handling these exceptions to use AssertJ instead? Something similar to:

assertThatThrownBy(() -> ...)
    .isInstanceOf(IllegalArgumentException.class)

RequestKey, JaasGrantedAuthority, and SwitchUserGrantedAuthority
assume certain final members are non-null.

Issue: spring-projectsgh-6892
@clementkng
clementkng force-pushed the gh-6892-constructor-null-checks branch from 947de70 to a9fbb70 Compare May 29, 2019 21:02
@clementkng

Copy link
Copy Markdown
Contributor Author

@jzheaux Thanks for the review! I made the changes to the tests.

@jzheaux
jzheaux merged commit e66369f into spring-projects:master May 29, 2019
@jzheaux

jzheaux commented May 29, 2019

Copy link
Copy Markdown
Collaborator

Thanks, @clementkng, this is now merged into master.

@clementkng
clementkng deleted the gh-6892-constructor-null-checks branch May 29, 2019 22:53
@clementkng
clementkng restored the gh-6892-constructor-null-checks branch May 30, 2019 06:22
@clementkng
clementkng deleted the gh-6892-constructor-null-checks branch May 30, 2019 11:04
@rwinch rwinch added in: core An issue in spring-security-core status: duplicate A duplicate of another issue type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 13, 2019
@rwinch rwinch added this to the 5.2.0.M3 milestone Jun 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: core An issue in spring-security-core status: duplicate A duplicate of another issue type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants