Fix compiler warnings in spring-security-aspects #18581
Open
+3
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes AspectJ compiler warnings in the
spring-security-aspectsmodule by suppressing expected warnings for deprecated aspect code.Changes
-Xlint:ignorecompiler argument tocompileAspectjtask inspring-security-aspects.gradle-Xlint:ignorecompiler argument tocompileTestAspectjtask inspring-security-aspects.gradleWarnings Fixed
The following AspectJ warnings are now suppressed:
AnnotationSecurityAspect.aj:72- advice defined in org.springframework.security.access.intercept.aspectj.aspect.AnnotationSecurityAspectAbstractMethodInterceptorAspect.aj:36- advice defined in org.springframework.security.authorization.method.aspectj.AbstractMethodInterceptorAspectThese warnings occur because the AspectJ compiler detects that advice in deprecated aspect classes may not match any join points in current codebases. This is expected behavior for deprecated code that is maintained for backward compatibility.
How to Verify
./gradlew :spring-security-aspects:compileAspectj "-Dorg.gradle.java.home=PATH_TO_JDK17"Before this change, 2 AspectJ warnings were reported. After this change, no AspectJ-specific warnings are present in the
spring-security-aspectsmodule.Related Issues
Contributes to gh-18405
Checklist