Polish contribution

See gh-33452
This commit is contained in:
Sam Brannen
2024-09-03 18:08:23 +02:00
parent 019c0b1d4e
commit 717b972f88
8 changed files with 35 additions and 31 deletions

View File

@@ -1241,8 +1241,8 @@ class ConstructorResolver {
/**
* Return a {@link Predicate} for a parameter type that checks if its target
* value is a {@link Class} and the value type is a {@link String}. This is
* a regular use cases where a {@link Class} is defined in the bean
* definition as fully-qualified class name.
* a regular use case where a {@link Class} is defined in the bean definition
* as a fully-qualified class name.
* @param valueType the type of the value
* @return a predicate to indicate a fallback match for a String to Class
* parameter

View File

@@ -137,8 +137,8 @@
<!ATTLIST bean name CDATA #IMPLIED>
<!--
Each bean definition must specify the fully qualified name of the class,
except if it serves only as a parent definition for child bean definitions.
Each bean definition must specify the fully-qualified name of the class,
unless it serves only as a parent definition for child bean definitions.
-->
<!ATTLIST bean class CDATA #IMPLIED>
@@ -452,7 +452,7 @@
<!--
Specification of the type of an overloaded method argument as a String.
For convenience, this may be a substring of the fully-qualified class name.
E.g. all the following would match "java.lang.String":
For example, all the following would match "java.lang.String":
- java.lang.String
- String
- Str

View File

@@ -270,7 +270,7 @@
<xsd:attribute name="class" type="xsd:string">
<xsd:annotation>
<xsd:documentation source="java:java.lang.Class"><![CDATA[
The fully qualified name of the bean's class, except if it serves only
The fully-qualified name of the bean's class, unless it serves only
as a parent definition for child bean definitions.
]]></xsd:documentation>
</xsd:annotation>
@@ -766,7 +766,7 @@
<xsd:documentation><![CDATA[
Specification of the type of an overloaded method argument as a String.
For convenience, this may be a substring of the fully-qualified class name.
E.g. all the following would match "java.lang.String":
For example, all the following would match "java.lang.String":
- java.lang.String
- String
- Str
@@ -1091,7 +1091,7 @@
<xsd:attribute name="value-type" type="xsd:string">
<xsd:annotation>
<xsd:documentation source="java:java.lang.Class"><![CDATA[
The default Java type for nested values. Must be a fully qualified
The default Java type for nested values. Must be a fully-qualified
class name.
]]></xsd:documentation>
</xsd:annotation>
@@ -1120,7 +1120,7 @@
<xsd:attribute name="key-type" type="xsd:string">
<xsd:annotation>
<xsd:documentation source="java:java.lang.Class"><![CDATA[
The default Java type for nested entry keys. Must be a fully qualified
The default Java type for nested entry keys. Must be a fully-qualified
class name.
]]></xsd:documentation>
</xsd:annotation>

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 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.
@@ -25,8 +25,9 @@ import org.springframework.lang.Nullable;
*
* <p>Implementations of this interface can be registered dynamically by using
* {@link org.springframework.context.annotation.ImportRuntimeHints @ImportRuntimeHints}
* or statically in {@code META-INF/spring/aot.factories} by using the fully-qualified class name of this
* interface as the key. A standard no-arg constructor is required for implementations.
* or statically in {@code META-INF/spring/aot.factories} by using the fully-qualified
* class name of this interface as the key. A standard no-arg constructor is required
* for implementations.
*
* @author Brian Clozel
* @author Stephane Nicoll
@@ -38,7 +39,8 @@ public interface RuntimeHintsRegistrar {
/**
* Contribute hints to the given {@link RuntimeHints} instance.
* @param hints the hints contributed so far for the deployment unit
* @param classLoader the classloader, or {@code null} if even the system ClassLoader isn't accessible
* @param classLoader the classloader, or {@code null} if even the system
* ClassLoader is not accessible
*/
void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader);

View File

@@ -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.
@@ -134,7 +134,8 @@ public class MethodMapTransactionAttributeSource
Assert.notNull(name, "Name must not be null");
int lastDotIndex = name.lastIndexOf('.');
if (lastDotIndex == -1) {
throw new IllegalArgumentException("'" + name + "' is not a valid method name: format is <fully-qualified class name>.<method-name>");
throw new IllegalArgumentException(
"'" + name + "' is not a valid method name: format is <fully-qualified class name>.<method-name>");
}
String className = name.substring(0, lastDotIndex);
String methodName = name.substring(lastDotIndex + 1);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 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.
@@ -39,7 +39,8 @@ import org.springframework.util.StringUtils;
*
* <p>Note: Will register all overloaded methods for a given name.
* Does not support explicit registration of certain overloaded methods.
* Supports "xxx*" mappings, e.g. "notify*" for "notify" and "notifyAll".
* Supports "xxx*" mappings &mdash; for example, "notify*" will match against
* "notify" and "notifyAll".
*
* @author Rod Johnson
* @author Juergen Hoeller

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 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.
@@ -107,7 +107,7 @@ class RuleBasedTransactionAttributeTests {
@Test
void ruleForCommitOnSubclassOfChecked() {
List<RollbackRuleAttribute> list = new ArrayList<>();
// Note that it's important to ensure that we have this as
// Note that it's important to ensure that we have this as a
// fully-qualified class name: otherwise it will match everything!
list.add(new RollbackRuleAttribute("java.lang.Exception"));
list.add(new NoRollbackRuleAttribute("IOException"));

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2021 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.
@@ -69,17 +69,17 @@ public class SimpleMappingExceptionResolver extends AbstractHandlerExceptionReso
/**
* Set the mappings between exception class names and error view names.
* The exception class name can be a substring, with no wildcard support at present.
* A value of "ServletException" would match {@code jakarta.servlet.ServletException}
* and subclasses, for example.
* <p><b>NB:</b> Consider carefully how
* specific the pattern is, and whether to include package information (which isn't mandatory).
* For example, "Exception" will match nearly anything, and will probably hide other rules.
* "java.lang.Exception" would be correct if "Exception" was meant to define a rule for all
* checked exceptions. With more unusual exception names such as "BaseBusinessException"
* there's no need to use fully-qualified class name.
* @param mappings exception patterns (can also be fully qualified class names) as keys,
* and error view names as values
* <p>The exception class name can be a substring, with no wildcard support
* at present. For example, a value of "ServletException" would match
* {@code jakarta.servlet.ServletException} and subclasses.
* <p><b>NB:</b> Consider carefully how specific the pattern is and whether
* to include package information (which isn't mandatory). For example,
* "Exception" will match nearly anything and will probably hide other rules.
* "java.lang.Exception" would be correct if "Exception" was meant to define
* a rule for all checked exceptions. With more unique exception names such
* as "BaseBusinessException" there's no need to use a fully-qualified class name.
* @param mappings exception patterns (can also be fully-qualified class names)
* as keys, and error view names as values
*/
public void setExceptionMappings(Properties mappings) {
this.exceptionMappings = mappings;