Browse Source

Expand acronyms FQN and FQCN

Closes gh-33452
pull/33473/head
Yanming Zhou 1 year ago committed by GitHub
parent
commit
019c0b1d4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.java
  2. 4
      spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-beans.dtd
  3. 4
      spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-beans.xsd
  4. 2
      spring-core/src/main/java/org/springframework/aot/hint/RuntimeHintsRegistrar.java
  5. 6
      spring-tx/src/main/java/org/springframework/transaction/interceptor/MethodMapTransactionAttributeSource.java
  6. 2
      spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSourceEditor.java
  7. 2
      spring-tx/src/test/java/org/springframework/transaction/interceptor/RuleBasedTransactionAttributeTests.java
  8. 2
      spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceEditorTests.java
  9. 2
      spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleMappingExceptionResolver.java

2
spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.java

@ -1242,7 +1242,7 @@ class ConstructorResolver { @@ -1242,7 +1242,7 @@ 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 an FQN.
* definition as 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

4
spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-beans.dtd

@ -451,8 +451,8 @@ @@ -451,8 +451,8 @@
<!--
Specification of the type of an overloaded method argument as a String.
For convenience, this may be a substring of the FQN. E.g. all the
following would match "java.lang.String":
For convenience, this may be a substring of the fully-qualified class name.
E.g. all the following would match "java.lang.String":
- java.lang.String
- String
- Str

4
spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-beans.xsd

@ -765,8 +765,8 @@ @@ -765,8 +765,8 @@
<xsd:annotation>
<xsd:documentation><![CDATA[
Specification of the type of an overloaded method argument as a String.
For convenience, this may be a substring of the FQN. E.g. all the
following would match "java.lang.String":
For convenience, this may be a substring of the fully-qualified class name.
E.g. all the following would match "java.lang.String":
- java.lang.String
- String
- Str

2
spring-core/src/main/java/org/springframework/aot/hint/RuntimeHintsRegistrar.java

@ -25,7 +25,7 @@ import org.springframework.lang.Nullable; @@ -25,7 +25,7 @@ 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 FQN of this
* 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

6
spring-tx/src/main/java/org/springframework/transaction/interceptor/MethodMapTransactionAttributeSource.java

@ -73,8 +73,8 @@ public class MethodMapTransactionAttributeSource @@ -73,8 +73,8 @@ public class MethodMapTransactionAttributeSource
/**
* Set a name/attribute map, consisting of "FQCN.method" method names
* (e.g. "com.mycompany.mycode.MyClass.myMethod") and
* Set a name/attribute map, consisting of "{@code <fully-qualified class name>.<method-name>}"
* method names (e.g. "com.mycompany.mycode.MyClass.myMethod") and
* {@link TransactionAttribute} instances (or Strings to be converted
* to {@code TransactionAttribute} instances).
* <p>Intended for configuration via setter injection, typically within
@ -134,7 +134,7 @@ public class MethodMapTransactionAttributeSource @@ -134,7 +134,7 @@ 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 FQN.methodName");
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);

2
spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSourceEditor.java

@ -29,7 +29,7 @@ import org.springframework.util.StringUtils; @@ -29,7 +29,7 @@ import org.springframework.util.StringUtils;
* {@link TransactionAttributeEditor} in this package.
*
* <p>Strings are in property syntax, with the form:<br>
* {@code FQCN.methodName=<transaction attribute string>}
* {@code <fully-qualified class name>.<method-name>=<transaction attribute string>}
*
* <p>For example:<br>
* {@code com.mycompany.mycode.MyClass.myMethod=PROPAGATION_MANDATORY,ISOLATION_DEFAULT}

2
spring-tx/src/test/java/org/springframework/transaction/interceptor/RuleBasedTransactionAttributeTests.java

@ -108,7 +108,7 @@ class RuleBasedTransactionAttributeTests { @@ -108,7 +108,7 @@ class RuleBasedTransactionAttributeTests {
void ruleForCommitOnSubclassOfChecked() {
List<RollbackRuleAttribute> list = new ArrayList<>();
// Note that it's important to ensure that we have this as
// a FQN: otherwise it will match everything!
// fully-qualified class name: otherwise it will match everything!
list.add(new RollbackRuleAttribute("java.lang.Exception"));
list.add(new NoRollbackRuleAttribute("IOException"));
RuleBasedTransactionAttribute rta = new RuleBasedTransactionAttribute(TransactionDefinition.PROPAGATION_REQUIRED, list);

2
spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceEditorTests.java

@ -28,7 +28,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException @@ -28,7 +28,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException
/**
* Tests for {@link TransactionAttributeSourceEditor}.
*
* <p>Format is: {@code FQN.Method=tx attribute representation}
* <p>Format is: {@code <fully-qualified class name>.<method-name>=tx attribute representation}
*
* @author Rod Johnson
* @author Sam Brannen

2
spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleMappingExceptionResolver.java

@ -77,7 +77,7 @@ public class SimpleMappingExceptionResolver extends AbstractHandlerExceptionReso @@ -77,7 +77,7 @@ public class SimpleMappingExceptionResolver extends AbstractHandlerExceptionReso
* 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 a FQN.
* 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
*/

Loading…
Cancel
Save