Modernize code for diamond, isEmpty & pattern matching

This commit is contained in:
Tran Ngoc Nhan
2024-09-24 01:42:38 +07:00
committed by GitHub
parent 40faaa0c15
commit fc377126de
107 changed files with 550 additions and 454 deletions

View File

@@ -28,6 +28,7 @@ import org.springframework.beans.PropertyAccessorFactory;
*
* @author Gunnar Hillert
* @author Gary Russell
* @author Ngoc Nhan
*
* @since 2.2
*
@@ -69,7 +70,7 @@ public class BeanPropertyParameterSource implements ParameterSource {
*/
public String[] getReadablePropertyNames() {
if (this.propertyNames == null) {
final List<String> names = new ArrayList<String>();
final List<String> names = new ArrayList<>();
PropertyDescriptor[] props = this.beanWrapper.getPropertyDescriptors();
for (PropertyDescriptor pd : props) {
if (this.beanWrapper.isReadableProperty(pd.getName())) {