Polish: String function use should be optimized for single characters
(cherry picked from commit 49fd724)
This commit is contained in:
committed by
Juergen Hoeller
parent
073e78b68d
commit
39ddd0f349
@@ -122,7 +122,7 @@ public class MethodMapTransactionAttributeSource
|
||||
*/
|
||||
public void addTransactionalMethod(String name, TransactionAttribute attr) {
|
||||
Assert.notNull(name, "Name must not be null");
|
||||
int lastDotIndex = name.lastIndexOf(".");
|
||||
int lastDotIndex = name.lastIndexOf('.');
|
||||
if (lastDotIndex == -1) {
|
||||
throw new IllegalArgumentException("'" + name + "' is not a valid method name: format is FQN.methodName");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user