Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix @since fields in Javadoc + Use the new Role Strategy APIs with enum in the naming strategy and tests #120

Merged
merged 4 commits into from
Jan 15, 2020

Conversation

res0nance
Copy link
Contributor

Minor cleanups and update the since/todo comments

@oleg-nenashev oleg-nenashev changed the title Misc Cleanups Fix @since fields in Javadoc + Use the new Role Strategy APIs with enum in tests Jan 2, 2020
@oleg-nenashev oleg-nenashev changed the title Fix @since fields in Javadoc + Use the new Role Strategy APIs with enum in tests Fix @since fields in Javadoc + Use the new Role Strategy APIs with enum in the naming strategy and tests Jan 2, 2020
@@ -41,13 +43,13 @@ public void checkName(String name) throws Failure {
if (auth instanceof RoleBasedAuthorizationStrategy){
RoleBasedAuthorizationStrategy rbas = (RoleBasedAuthorizationStrategy) auth;
//firstly check global role
SortedMap<Role, Set<String>> gRole = rbas.getGrantedRoles(RoleBasedAuthorizationStrategy.GLOBAL);
SortedMap<Role, Set<String>> gRole = rbas.getGrantedRoles(RoleType.Global);
Copy link
Member

Choose a reason for hiding this comment

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

It may actually imply some performance differences, but it is fine in the case of this extension

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I double checked it, somehow performance is worse, and I'm doubting the bench tests for #119 and #118 they both show similar performance losses as what i saw from here. I took the tip of master and compared it to the benches for all 3 PRs. It seems like the baseline is off. Maybe an infra change is causing this Inaccuracy I might run the benches locally to verify.

In this exact case performance should improve or be of negligible difference since this reduces it by 2 calls conversion from string to enum and calling the non deprecated function.

@oleg-nenashev oleg-nenashev merged commit 8782fdd into jenkinsci:master Jan 15, 2020
@res0nance res0nance deleted the deprecated branch January 15, 2020 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants