From 6a81ed3a50758cd9960c1953a89873951ac03ea0 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Wed, 8 Mar 2023 17:43:35 +0100 Subject: [PATCH] Polishing --- .../src/main/java/org/springframework/beans/BeanUtils.java | 5 +++-- .../expression/spel/ast/FunctionReference.java | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java b/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java index 1fc33c2f6e..bc0b2de1a1 100644 --- a/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java +++ b/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -247,7 +247,8 @@ public abstract class BeanUtils { // A single public constructor return (Constructor) ctors[0]; } - else if (ctors.length == 0){ + else if (ctors.length == 0) { + // No public constructors -> check non-public ctors = clazz.getDeclaredConstructors(); if (ctors.length == 1) { // A single non-public constructor, e.g. from a non-public record type diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/FunctionReference.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/FunctionReference.java index 0417735386..b884aa1ed6 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/FunctionReference.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/FunctionReference.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -144,7 +144,7 @@ public class FunctionReference extends SpelNodeImpl { for (int i = 0; i < getChildCount(); i++) { sj.add(getChild(i).toStringAST()); } - return '#' + this.name + sj.toString(); + return '#' + this.name + sj; } /**