From ca5cc13948f211ec904200415f4c3609db224bfc Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Tue, 4 Feb 2020 07:32:16 -0600 Subject: [PATCH] SecurityEvaluationContextExtension Signature SecurityEvaluationContextExtension.getRootObject() should have a signature with a return type of SecurityExpressionRoot. See EvaluationContextExtension javadoc https://github.com/spring-projects/spring-data-commons/blob/eed7658ce54dfc3960c28cd90f551fdd27b4adba/src/main/java/org/springframework/data/spel/spi/EvaluationContextExtension.java#L61-L64 This enhancement will allow for Spring Data to make certain types of optimizations. Fixes gh-7891 --- .../repository/query/SecurityEvaluationContextExtension.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/src/main/java/org/springframework/security/data/repository/query/SecurityEvaluationContextExtension.java b/data/src/main/java/org/springframework/security/data/repository/query/SecurityEvaluationContextExtension.java index f8138fb250..936ccf6f25 100644 --- a/data/src/main/java/org/springframework/security/data/repository/query/SecurityEvaluationContextExtension.java +++ b/data/src/main/java/org/springframework/security/data/repository/query/SecurityEvaluationContextExtension.java @@ -103,7 +103,7 @@ public class SecurityEvaluationContextExtension } @Override - public Object getRootObject() { + public SecurityExpressionRoot getRootObject() { Authentication authentication = getAuthentication(); return new SecurityExpressionRoot(authentication) { };