diff --git a/framework-docs/modules/ROOT/pages/languages/kotlin/spring-projects-in.adoc b/framework-docs/modules/ROOT/pages/languages/kotlin/spring-projects-in.adoc index 6efa48274a4..300c0089c89 100644 --- a/framework-docs/modules/ROOT/pages/languages/kotlin/spring-projects-in.adoc +++ b/framework-docs/modules/ROOT/pages/languages/kotlin/spring-projects-in.adoc @@ -166,7 +166,7 @@ public class SampleConfiguration { @Bean @NotNull public SampleBean sampleBean$demo_kotlin_internal_test() { - return new SampleBean(); + return new SampleBean(); } } ---- diff --git a/spring-context/src/test/kotlin/org/springframework/context/event/KotlinApplicationListenerMethodAdapterTests.kt b/spring-context/src/test/kotlin/org/springframework/context/event/KotlinApplicationListenerMethodAdapterTests.kt index 6141b354d51..4ac69bb0158 100644 --- a/spring-context/src/test/kotlin/org/springframework/context/event/KotlinApplicationListenerMethodAdapterTests.kt +++ b/spring-context/src/test/kotlin/org/springframework/context/event/KotlinApplicationListenerMethodAdapterTests.kt @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2024 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. @@ -64,9 +64,9 @@ class KotlinApplicationListenerMethodAdapterTests { private class StaticApplicationListenerMethodAdapter(method: Method, private val targetBean: Any) : ApplicationListenerMethodAdapter("unused", targetBean.javaClass, method) { public override fun getTargetBean(): Any { - return targetBean + return targetBean + } } - } @Suppress("RedundantSuspendModifier", "UNUSED_PARAMETER") private class SampleEvents { diff --git a/spring-core-test/src/test/java/org/springframework/aot/agent/InstrumentedMethodTests.java b/spring-core-test/src/test/java/org/springframework/aot/agent/InstrumentedMethodTests.java index 733c368c699..48a9b68652e 100644 --- a/spring-core-test/src/test/java/org/springframework/aot/agent/InstrumentedMethodTests.java +++ b/spring-core-test/src/test/java/org/springframework/aot/agent/InstrumentedMethodTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2024 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. @@ -124,7 +124,7 @@ class InstrumentedMethodTests { } @Test - void classGetConstructorShouldMatchInstrospectPublicConstructorsHint() { + void classGetConstructorShouldMatchIntrospectPublicConstructorsHint() { hints.reflection().registerType(String.class, MemberCategory.INTROSPECT_PUBLIC_CONSTRUCTORS); assertThatInvocationMatches(InstrumentedMethod.CLASS_GETCONSTRUCTOR, this.stringGetConstructor); } @@ -148,7 +148,7 @@ class InstrumentedMethodTests { } @Test - void classGetConstructorShouldMatchInstrospectConstructorHint() { + void classGetConstructorShouldMatchIntrospectConstructorHint() { hints.reflection().registerType(String.class,typeHint -> typeHint.withConstructor(Collections.emptyList(), ExecutableMode.INTROSPECT)); assertThatInvocationMatches(InstrumentedMethod.CLASS_GETCONSTRUCTOR, this.stringGetConstructor); @@ -210,7 +210,7 @@ class InstrumentedMethodTests { } @Test - void classGetDeclaredConstructorShouldMatchInstrospectConstructorHint() { + void classGetDeclaredConstructorShouldMatchIntrospectConstructorHint() { hints.reflection().registerType(String.class, typeHint -> typeHint.withConstructor(TypeReference.listOf(byte[].class, byte.class), ExecutableMode.INTROSPECT)); assertThatInvocationMatches(InstrumentedMethod.CLASS_GETDECLAREDCONSTRUCTOR, this.stringGetDeclaredConstructor); @@ -354,13 +354,13 @@ class InstrumentedMethodTests { } @Test - void classGetMethodsShouldMatchInstrospectDeclaredMethodsHint() { + void classGetMethodsShouldMatchIntrospectDeclaredMethodsHint() { hints.reflection().registerType(String.class, MemberCategory.INTROSPECT_DECLARED_METHODS); assertThatInvocationMatches(InstrumentedMethod.CLASS_GETMETHODS, this.stringGetMethods); } @Test - void classGetMethodsShouldMatchInstrospectPublicMethodsHint() { + void classGetMethodsShouldMatchIntrospectPublicMethodsHint() { hints.reflection().registerType(String.class, MemberCategory.INTROSPECT_PUBLIC_METHODS); assertThatInvocationMatches(InstrumentedMethod.CLASS_GETMETHODS, this.stringGetMethods); } @@ -396,7 +396,7 @@ class InstrumentedMethodTests { } @Test - void classGetMethodShouldMatchInstrospectPublicMethodsHint() { + void classGetMethodShouldMatchIntrospectPublicMethodsHint() { hints.reflection().registerType(String.class, MemberCategory.INTROSPECT_PUBLIC_METHODS); assertThatInvocationMatches(InstrumentedMethod.CLASS_GETMETHOD, this.stringGetToStringMethod); } @@ -434,13 +434,13 @@ class InstrumentedMethodTests { } @Test - void classGetMethodShouldNotMatchInstrospectPublicMethodsHintWhenPrivate() { + void classGetMethodShouldNotMatchIntrospectPublicMethodsHintWhenPrivate() { hints.reflection().registerType(String.class, MemberCategory.INTROSPECT_PUBLIC_METHODS); assertThatInvocationDoesNotMatch(InstrumentedMethod.CLASS_GETMETHOD, this.stringGetScaleMethod); } @Test - void classGetMethodShouldMatchInstrospectDeclaredMethodsHintWhenPrivate() { + void classGetMethodShouldMatchIntrospectDeclaredMethodsHintWhenPrivate() { hints.reflection().registerType(String.class, MemberCategory.INTROSPECT_DECLARED_METHODS); assertThatInvocationMatches(InstrumentedMethod.CLASS_GETMETHOD, this.stringGetScaleMethod); } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/TableMetaDataContext.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/TableMetaDataContext.java index 9ae79a43493..bf69f2f7c4a 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/TableMetaDataContext.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/TableMetaDataContext.java @@ -432,12 +432,12 @@ public class TableMetaDataContext { private final boolean quoting; - public QuoteHandler(@Nullable String identifierQuoteString) { + QuoteHandler(@Nullable String identifierQuoteString) { this.identifierQuoteString = identifierQuoteString; this.quoting = StringUtils.hasText(identifierQuoteString); } - public void appendTo(StringBuilder stringBuilder, @Nullable String item) { + void appendTo(StringBuilder stringBuilder, @Nullable String item) { if (this.quoting) { stringBuilder.append(this.identifierQuoteString) .append(item).append(this.identifierQuoteString); diff --git a/spring-web/src/main/java/org/springframework/web/util/pattern/PathPattern.java b/spring-web/src/main/java/org/springframework/web/util/pattern/PathPattern.java index 3067bcefa69..c87a538cbeb 100644 --- a/spring-web/src/main/java/org/springframework/web/util/pattern/PathPattern.java +++ b/spring-web/src/main/java/org/springframework/web/util/pattern/PathPattern.java @@ -44,7 +44,7 @@ import org.springframework.util.StringUtils; *
{spring} matches a path segment and captures it as a variable named "spring"{spring:[a-z]+} matches the regexp {@code [a-z]+} against a path segment
- * and captures it a path variable named "spring"{*spring} matches zero or more path segments until the end of the path
* and captures it as a variable named "spring"