From f1cf91c9f9d8b0599b1efffc7388f6049d41e370 Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Fri, 5 Dec 2025 12:22:24 +0100 Subject: [PATCH] Polishing --- .../SynthesizedMergedAnnotationInvocationHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-core/src/main/java/org/springframework/core/annotation/SynthesizedMergedAnnotationInvocationHandler.java b/spring-core/src/main/java/org/springframework/core/annotation/SynthesizedMergedAnnotationInvocationHandler.java index 69f34eb28b7..0e977696c65 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/SynthesizedMergedAnnotationInvocationHandler.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/SynthesizedMergedAnnotationInvocationHandler.java @@ -170,7 +170,8 @@ final class SynthesizedMergedAnnotationInvocationHandler i Class type = value.getClass(); if (type.isArray()) { StringBuilder builder = new StringBuilder("{"); - for (int i = 0; i < Array.getLength(value); i++) { + int arrayLength = Array.getLength(value); + for (int i = 0; i < arrayLength; i++) { if (i > 0) { builder.append(", "); }