Fix compile warnings for spring-security-config#18596
Fix compile warnings for spring-security-config#18596023-dev wants to merge 3 commits intospring-projects:mainfrom
Conversation
|
Thank you. Unfortunately, the build fails with the changes. Can you please update the pull request to resolve the errors? |
|
@rwinch |
Signed-off-by: 023-dev <0_2_3@naver.com>
|
@rwinch |
|
@023-dev It appears that that the build is still failing. Would you mind taking a look at it? You can check the build using the same steps in the linked CI. |
Signed-off-by: 023-dev <0_2_3@naver.com>
Head branch was pushed to by a user without write access
|
Thank you for the feedback, and I apologize for missing the previous build failure. |
Explicitly configure Instancio for OneTimeTokenAuthenticationToken in SerializationSamples.java. This ensures that the generated test instances use a valid, serializable principal (null) instead of the default Object() which causes serialization failures. Signed-off-by: 023-dev <0_2_3@naver.com>
This PR removes all compiler warnings from the
spring-security-configmodule and applies thecompile-warnings-errorplugin to prevent future warnings.Changes
Java Changes
SpringOpaqueTokenIntrospectorconstructor with the new Builder pattern introduced in Spring Security 6.5new SpringOpaqueTokenIntrospector(introspectionUri, clientId, clientSecret)SpringOpaqueTokenIntrospector.withIntrospectionUri(...).clientId(...).clientSecret(...).build()Kotlin Changes
AuthorizeHttpRequestsDsl.kt:
Object::class.javawithAny::class.java(Kotlin best practice)resolveRolePrefix()andresolveRoleHierarchy()return types to nullable to fix "condition always true" warningsHeadersDsl.kt: Added
@Suppress("DEPRECATION")for deprecatedHpkpConfigusage (class itself is deprecated)HttpSecurityDsl.kt: Added
@Suppress("DEPRECATION")for deprecatedrequiresChannel()methodRequiresChannelDsl.kt: Added
@file:Suppress("DEPRECATION")for deprecated channel security classesX509Dsl.kt: Added
@Suppress("DEPRECATION")for deprecatedsubjectPrincipalRegexpropertyHttpPublicKeyPinningDsl.kt: Added
@file:Suppress("DEPRECATION")for deprecated HPKP classesSessionFixationDsl.kt: Removed unnecessary null case in when expression
Build Configuration
compile-warnings-errorplugin to fail build on warningsTesting
Related Issues
Closes gh-18419