Polish: String function use should be optimized for single characters

(cherry picked from commit 49fd724)
This commit is contained in:
igor-suhorukov
2018-02-25 20:34:35 +01:00
committed by Juergen Hoeller
parent 073e78b68d
commit 39ddd0f349
23 changed files with 32 additions and 32 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");
}