mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-26 08:59:09 +00:00
Polish: String function use should be optimized for single characters
This commit is contained in:
committed by
Juergen Hoeller
parent
9c55dd5961
commit
49fd724d8f
+1
-1
@@ -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