refactor: 使用 getFirst 优化首元素访问

This commit is contained in:
疯狂的狮子Li
2026-06-11 13:57:43 +08:00
parent d8f8d5493d
commit 0d72999366
14 changed files with 22 additions and 22 deletions
@@ -108,7 +108,7 @@ public class PlusDataPermissionHandler {
}
Object defaultValue = "-1";
NullSafeStandardEvaluationContext context = new NullSafeStandardEvaluationContext(defaultValue);
context.addPropertyAccessor(new NullSafePropertyAccessor(context.getPropertyAccessors().get(0), defaultValue));
context.addPropertyAccessor(new NullSafePropertyAccessor(context.getPropertyAccessors().getFirst(), defaultValue));
context.setBeanResolver(beanResolver);
DataPermissionHelper.getContext().forEach(context::setVariable);
Set<String> conditions = new HashSet<>();