Browse Source

Polishing

pull/34656/head
Juergen Hoeller 11 months ago
parent
commit
403362fe3c
  1. 3
      spring-beans/src/main/java/org/springframework/beans/factory/aot/InstanceSupplierCodeGenerator.java
  2. 8
      spring-core/src/main/java/org/springframework/util/StringUtils.java
  3. 2
      spring-core/src/test/java/org/springframework/core/GenericTypeResolverTests.java
  4. 3
      spring-webmvc/src/test/java/org/springframework/web/servlet/function/ResourceHandlerFunctionTests.java

3
spring-beans/src/main/java/org/springframework/beans/factory/aot/InstanceSupplierCodeGenerator.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 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.
@ -443,6 +443,7 @@ public class InstanceSupplierCodeGenerator { @@ -443,6 +443,7 @@ public class InstanceSupplierCodeGenerator {
}
}
record ConstructorDescriptor(String beanName, Constructor<?> constructor, Class<?> publicType) {
Class<?> actualType() {

8
spring-core/src/main/java/org/springframework/util/StringUtils.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 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.
@ -787,9 +787,9 @@ public abstract class StringUtils { @@ -787,9 +787,9 @@ public abstract class StringUtils {
pathElements.addFirst(CURRENT_PATH);
}
final String joined = collectionToDelimitedString(pathElements, FOLDER_SEPARATOR);
// avoid string concatenation with empty prefix
return prefix.isEmpty() ? joined : prefix + joined;
String joined = collectionToDelimitedString(pathElements, FOLDER_SEPARATOR);
// Avoid String concatenation with empty prefix
return (prefix.isEmpty() ? joined : prefix + joined);
}
/**

2
spring-core/src/test/java/org/springframework/core/GenericTypeResolverTests.java

@ -461,7 +461,7 @@ class GenericTypeResolverTests { @@ -461,7 +461,7 @@ class GenericTypeResolverTests {
}
}
public interface InterfaceWithDefaultMethod<T extends InheritsDefaultMethod.AbstractType> {
public interface InterfaceWithDefaultMethod<T extends InterfaceWithDefaultMethod.AbstractType> {
default String get(T input) {
throw new UnsupportedOperationException();

3
spring-webmvc/src/test/java/org/springframework/web/servlet/function/ResourceHandlerFunctionTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 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.
@ -56,6 +56,7 @@ class ResourceHandlerFunctionTests { @@ -56,6 +56,7 @@ class ResourceHandlerFunctionTests {
private ResourceHttpMessageConverter messageConverter;
@BeforeEach
void createContext() {
this.messageConverter = new ResourceHttpMessageConverter();

Loading…
Cancel
Save