Polish: String function use should be optimized for single characters
This commit is contained in:
committed by
Juergen Hoeller
parent
9c55dd5961
commit
49fd724d8f
@@ -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