Polish: String function use should be optimized for single characters

This commit is contained in:
igor-suhorukov
2018-02-25 22:34:35 +03:00
committed by Juergen Hoeller
parent 9c55dd5961
commit 49fd724d8f
31 changed files with 42 additions and 42 deletions

View File

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