-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Replace deprecated methods and classes in Quarkus Security and tiny bit of refactoring #44306
Replace deprecated methods and classes in Quarkus Security and tiny bit of refactoring #44306
Conversation
Status for workflow
|
@@ -101,16 +102,16 @@ public Uni<? extends SecurityIdentity> apply(SecurityIdentity securityIdentity) | |||
* @return The first identity provider that was registered with this type | |||
*/ | |||
public SecurityIdentity authenticateBlocking(AuthenticationRequest request) { | |||
List<IdentityProvider> providers = this.providers.get(request.getClass()); | |||
var providers = this.providers.get(request.getClass()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me it looks like it is becoming less obvious what the actual var type is, we'll have no idea what providers
are when we look at this code in 6 months :-), I don't really mind, I'm just not sure about across the board replacement of local type references with var
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this because List<IdentityProvider>
is a raw type and var
is shorter to write :-) I don't give importance to things like these, for me it's like a book. I'll add it back (with a wildcard) because if it is better readable for someone like you, it should be there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michalvavrik It is ok, you don't have to...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NP, I am finishing other PR, so if this one is not merged in an hour, I'll change it. One way or another thanks.
Changes:
AnnotationsTransformer
constructor marked for removalSecurityCheckStorage
as static volatile variable on recoreder as we dont' need it thereio.smallrye.mutiny.groups.UniAndGroupIterable#combinedWith(java.util.function.Function<java.util.List<?>,O>)
as it is marked for removalQuarkusIdentityProviderManagerImpl
, it's not great, but hopefully result is bit betterio.quarkus.security.spi.AdditionalSecuredClassesBuildItem
for removal, it has been deprecated since 2.15NativeOrNativeSourcesBuild
is deprecated, IMO we could always produce theNativeImageFeatureBuildItem
and Quarkus should take care of it. Nevertheless, in order to keep original behavior, I replaced it with thequarkus.native.enabled
config property