Expand acronyms FQN and FQCN
Closes gh-33452
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user