diff --git a/org.springframework.transaction/src/main/java/org/springframework/transaction/interceptor/CompositeTransactionAttributeSource.java b/org.springframework.transaction/src/main/java/org/springframework/transaction/interceptor/CompositeTransactionAttributeSource.java index 4266e8c3da..6b5d017318 100644 --- a/org.springframework.transaction/src/main/java/org/springframework/transaction/interceptor/CompositeTransactionAttributeSource.java +++ b/org.springframework.transaction/src/main/java/org/springframework/transaction/interceptor/CompositeTransactionAttributeSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2006 the original author or authors. + * Copyright 2002-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,9 +51,8 @@ public class CompositeTransactionAttributeSource implements TransactionAttribute } - public TransactionAttribute getTransactionAttribute(Method method, Class targetClass) { - for (int i = 0; i < this.transactionAttributeSources.length; i++) { - TransactionAttributeSource tas = this.transactionAttributeSources[i]; + public TransactionAttribute getTransactionAttribute(Method method, Class targetClass) { + for (TransactionAttributeSource tas : this.transactionAttributeSources) { TransactionAttribute ta = tas.getTransactionAttribute(method, targetClass); if (ta != null) { return ta; diff --git a/org.springframework.transaction/src/main/java/org/springframework/transaction/interceptor/MatchAlwaysTransactionAttributeSource.java b/org.springframework.transaction/src/main/java/org/springframework/transaction/interceptor/MatchAlwaysTransactionAttributeSource.java index 18e4cb1055..42767a7ea4 100644 --- a/org.springframework.transaction/src/main/java/org/springframework/transaction/interceptor/MatchAlwaysTransactionAttributeSource.java +++ b/org.springframework.transaction/src/main/java/org/springframework/transaction/interceptor/MatchAlwaysTransactionAttributeSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2006 the original author or authors. + * Copyright 2002-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,7 +49,7 @@ public class MatchAlwaysTransactionAttributeSource implements TransactionAttribu } - public TransactionAttribute getTransactionAttribute(Method method, Class targetClass) { + public TransactionAttribute getTransactionAttribute(Method method, Class targetClass) { return this.transactionAttribute; } diff --git a/org.springframework.transaction/src/main/java/org/springframework/transaction/interceptor/MethodMapTransactionAttributeSource.java b/org.springframework.transaction/src/main/java/org/springframework/transaction/interceptor/MethodMapTransactionAttributeSource.java index 0a2b606232..0181a5efa5 100644 --- a/org.springframework.transaction/src/main/java/org/springframework/transaction/interceptor/MethodMapTransactionAttributeSource.java +++ b/org.springframework.transaction/src/main/java/org/springframework/transaction/interceptor/MethodMapTransactionAttributeSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -137,7 +137,7 @@ public class MethodMapTransactionAttributeSource * @param mappedName mapped method name * @param attr attribute associated with the method */ - public void addTransactionalMethod(Class clazz, String mappedName, TransactionAttribute attr) { + public void addTransactionalMethod(Class clazz, String mappedName, TransactionAttribute attr) { Assert.notNull(clazz, "Class must not be null"); Assert.notNull(mappedName, "Mapped name must not be null"); String name = clazz.getName() + '.' + mappedName; @@ -204,7 +204,7 @@ public class MethodMapTransactionAttributeSource } - public TransactionAttribute getTransactionAttribute(Method method, Class targetClass) { + public TransactionAttribute getTransactionAttribute(Method method, Class targetClass) { if (this.eagerlyInitialized) { return this.transactionAttributeMap.get(method); } diff --git a/org.springframework.transaction/src/main/java/org/springframework/transaction/interceptor/NameMatchTransactionAttributeSource.java b/org.springframework.transaction/src/main/java/org/springframework/transaction/interceptor/NameMatchTransactionAttributeSource.java index 4132efccd5..8a69517e0b 100644 --- a/org.springframework.transaction/src/main/java/org/springframework/transaction/interceptor/NameMatchTransactionAttributeSource.java +++ b/org.springframework.transaction/src/main/java/org/springframework/transaction/interceptor/NameMatchTransactionAttributeSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -97,7 +97,7 @@ public class NameMatchTransactionAttributeSource implements TransactionAttribute } - public TransactionAttribute getTransactionAttribute(Method method, Class targetClass) { + public TransactionAttribute getTransactionAttribute(Method method, Class targetClass) { // look for direct name match String methodName = method.getName(); TransactionAttribute attr = this.nameMap.get(methodName);