Browse Source

Add @SuppressWarnings(unchecked, rawtypes) on functions in deprecated class

Closes gh-18412

Signed-off-by: Bae Jihong <dasog@naver.com>
pull/18738/head
Bae Jihong 1 month ago committed by 피레스
parent
commit
02cb9fed02
  1. 1
      access/src/main/java/org/springframework/security/access/prepost/PrePostAdviceReactiveMethodInterceptor.java
  2. 1
      access/src/main/java/org/springframework/security/acls/afterinvocation/AclEntryAfterInvocationCollectionFilteringProvider.java
  3. 1
      access/src/main/java/org/springframework/security/messaging/access/expression/MessageExpressionConfigAttribute.java

1
access/src/main/java/org/springframework/security/access/prepost/PrePostAdviceReactiveMethodInterceptor.java

@ -145,6 +145,7 @@ public class PrePostAdviceReactiveMethodInterceptor implements MethodInterceptor @@ -145,6 +145,7 @@ public class PrePostAdviceReactiveMethodInterceptor implements MethodInterceptor
.map((r) -> (attr != null) ? this.postAdvice.after(auth, invocation, attr, r) : r));
}
@SuppressWarnings("unchecked")
private static <T extends Publisher<?>> @Nullable T proceed(final MethodInvocation invocation) {
try {
return (T) invocation.proceed();

1
access/src/main/java/org/springframework/security/acls/afterinvocation/AclEntryAfterInvocationCollectionFilteringProvider.java

@ -111,6 +111,7 @@ public class AclEntryAfterInvocationCollectionFilteringProvider extends Abstract @@ -111,6 +111,7 @@ public class AclEntryAfterInvocationCollectionFilteringProvider extends Abstract
return returnedObject;
}
@SuppressWarnings({ "unchecked", "rawtypes" })
private Filterer getFilterer(Object returnedObject) {
if (returnedObject instanceof Collection) {
return new CollectionFilterer((Collection) returnedObject);

1
access/src/main/java/org/springframework/security/messaging/access/expression/MessageExpressionConfigAttribute.java

@ -50,6 +50,7 @@ class MessageExpressionConfigAttribute implements ConfigAttribute, EvaluationCon @@ -50,6 +50,7 @@ class MessageExpressionConfigAttribute implements ConfigAttribute, EvaluationCon
* @param authorizeExpression the {@link Expression} to use. Cannot be null
* @param matcher the {@link MessageMatcher} used to match the messages.
*/
@SuppressWarnings("unchecked")
MessageExpressionConfigAttribute(Expression authorizeExpression, MessageMatcher<?> matcher) {
Assert.notNull(authorizeExpression, "authorizeExpression cannot be null");
Assert.notNull(matcher, "matcher cannot be null");

Loading…
Cancel
Save