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

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