Expand acronyms FQN and FQCN

Closes gh-33452
This commit is contained in:
Yanming Zhou
2024-09-03 23:30:27 +08:00
committed by GitHub
parent 529f311bd4
commit 019c0b1d4e
9 changed files with 13 additions and 13 deletions

View File

@@ -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
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);

View File

@@ -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}

View File

@@ -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);

View File

@@ -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