Skip to content

Commit

Permalink
Replace space indentation with tabs
Browse files Browse the repository at this point in the history
Issue: SPR-10127
  • Loading branch information
philwebb authored and cbeams committed Dec 28, 2012
1 parent 1762157 commit 2cf45ba
Show file tree
Hide file tree
Showing 154 changed files with 1,572 additions and 1,567 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ public Object proceed() throws Throwable {
}

Object interceptorOrInterceptionAdvice =
this.interceptorsAndDynamicMethodMatchers.get(++this.currentInterceptorIndex);
this.interceptorsAndDynamicMethodMatchers.get(++this.currentInterceptorIndex);
if (interceptorOrInterceptionAdvice instanceof InterceptorAndDynamicMethodMatcher) {
// Evaluate dynamic method matcher here: static part will already have
// been evaluated and found to match.
InterceptorAndDynamicMethodMatcher dm =
(InterceptorAndDynamicMethodMatcher) interceptorOrInterceptionAdvice;
(InterceptorAndDynamicMethodMatcher) interceptorOrInterceptionAdvice;
if (dm.methodMatcher.matches(this.method, this.targetClass, this.arguments)) {
return dm.interceptor.invoke(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ public Object getTarget() throws BeansException {
Object target = this.targetInThread.get();
if (target == null) {
if (logger.isDebugEnabled()) {
logger.debug("No target for prototype '" + getTargetBeanName() + "' bound to thread: " +
"creating one and binding it to thread '" + Thread.currentThread().getName() + "'");
logger.debug("No target for prototype '" + getTargetBeanName() +
"' bound to thread: " +
"creating one and binding it to thread '" +
Thread.currentThread().getName() + "'");
}
// Associate target with ThreadLocal.
target = newPrototypeInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ public void testMatchGenericArgument() {
@Test
public void testMatchVarargs() throws SecurityException, NoSuchMethodException {
class MyTemplate {
public int queryForInt(String sql, Object... params) {
return 0;
}
public int queryForInt(String sql, Object... params) {
return 0;
}
}

String expression = "execution(int *.*(String, Object...))";
Expand All @@ -101,8 +101,8 @@ public int queryForInt(String sql, Object... params) {

// TODO: the expression above no longer matches Object[]
// assertFalse(jdbcVarArgs.matches(
// JdbcTemplate.class.getMethod("queryForInt", String.class, Object[].class),
// JdbcTemplate.class));
// JdbcTemplate.class.getMethod("queryForInt", String.class, Object[].class),
// JdbcTemplate.class));

assertTrue(jdbcVarArgs.matches(
MyTemplate.class.getMethod("queryForInt", String.class, Object[].class),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,14 @@ public TestException(String string) {
}

public static interface TestService {
public String sayHello();
public String sayHello();
}

@Log
public static class TestServiceImpl implements TestService{
public String sayHello() {
throw new TestException("TestServiceImpl");
}
public static class TestServiceImpl implements TestService {
public String sayHello() {
throw new TestException("TestServiceImpl");
}
}

public class LogUserAdvice implements MethodBeforeAdvice, ThrowsAdvice {
Expand All @@ -149,12 +149,12 @@ public class LogUserAdvice implements MethodBeforeAdvice, ThrowsAdvice {

public void before(Method method, Object[] objects, Object o) throws Throwable {
countBefore++;
}
}

public void afterThrowing(Exception e) throws Throwable {
countThrows++;
throw e;
}
throw e;
}

public int getCountBefore() {
return countBefore;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void testAndOrNotReplacement() {

@Test(expected=IllegalArgumentException.class)
public void testSetTypePatternWithNullArgument() throws Exception {
new TypePatternClassFilter(null);
new TypePatternClassFilter(null);
}

@Test(expected=IllegalStateException.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ public void testIntroductionOnTargetExcludedByTypePattern() {
CannotBeUnlocked.class);
assertFalse("Type pattern must have excluded mixin", proxy instanceof Lockable);
}

/* prereq AspectJ 1.6.7
@Test
public void testIntroductionBasedOnAnnotationMatch_Spr5307() {
Expand All @@ -426,8 +427,10 @@ public void testIntroductionBasedOnAnnotationMatch_Spr5307() {
Lockable lockable = (Lockable)proxy;
lockable.locked();
}
*/
*/

// TODO: Why does this test fail? It hasn't been run before, so it maybe never actually passed...

public void XtestIntroductionWithArgumentBinding() {
TestBean target = new TestBean();

Expand Down Expand Up @@ -764,8 +767,8 @@ public static class BindingAspectWithSingleArg {
public void setAge(int a) {}

@Around(value="setAge(age)",argNames="age")
// @ArgNames({"age"}) // AMC needs more work here? ignoring pjp arg... ok??
// // argNames should be suported in Around as it is in Pointcut
// @ArgNames({"age"}) // AMC needs more work here? ignoring pjp arg... ok??
// argNames should be suported in Around as it is in Pointcut
public void changeReturnType(ProceedingJoinPoint pjp, int age) throws Throwable {
pjp.proceed(new Object[] {age*2});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public String toString() {
Method m = Object.class.getMethod("hashCode", (Class[]) null);
Object proxy = new Object();
ReflectiveMethodInvocation invocation =
new ReflectiveMethodInvocation(proxy, target, m, null, null, is);
new ReflectiveMethodInvocation(proxy, target, m, null, null, is);

// If it hits target, the test will fail with the UnsupportedOpException
// in the inner class above.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ package org.springframework.beans.factory.aspectj;
* @since 3.0.0
*/
public abstract aspect GenericInterfaceDrivenDependencyInjectionAspect<I> extends AbstractInterfaceDrivenDependencyInjectionAspect {
declare parents: I implements ConfigurableObject;
declare parents: I implements ConfigurableObject;

public pointcut inConfigurableBean() : within(I+);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import org.springframework.dao.DataAccessException;
import org.springframework.orm.jpa.EntityManagerFactoryUtils;

public aspect JpaExceptionTranslatorAspect {
pointcut entityManagerCall(): call(* EntityManager.*(..)) || call(* EntityManagerFactory.*(..)) || call(* EntityTransaction.*(..)) || call(* Query.*(..));
pointcut entityManagerCall(): call(* EntityManager.*(..)) || call(* EntityManagerFactory.*(..)) || call(* EntityTransaction.*(..)) || call(* Query.*(..));

after() throwing(RuntimeException re): entityManagerCall() {
DataAccessException dex = EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(re);
if (dex != null) {
throw dex;
} else {
throw re;
}
}
}
after() throwing(RuntimeException re): entityManagerCall() {
DataAccessException dex = EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(re);
if (dex != null) {
throw dex;
} else {
throw re;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public abstract aspect AbstractTransactionAspect extends TransactionAspectSuppor
@SuppressAjWarnings("adviceDidNotMatch")
after(Object txObject) throwing(Throwable t) : transactionalMethodExecution(txObject) {
try {
completeTransactionAfterThrowing(TransactionAspectSupport.currentTransactionInfo(), t);
completeTransactionAfterThrowing(TransactionAspectSupport.currentTransactionInfo(), t);
}
catch (Throwable t2) {
logger.error("Failed to close transaction after throwing in a transactional method", t2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,83 +18,83 @@ package org.springframework.mock.staticmock;

privileged aspect Person_Roo_Entity {

@javax.persistence.PersistenceContext
transient javax.persistence.EntityManager Person.entityManager;

@javax.persistence.Id
@javax.persistence.GeneratedValue(strategy = javax.persistence.GenerationType.AUTO)
@javax.persistence.Column(name = "id")
private java.lang.Long Person.id;

@javax.persistence.Version
@javax.persistence.Column(name = "version")
private java.lang.Integer Person.version;

public java.lang.Long Person.getId() {
return this.id;
}

public void Person.setId(java.lang.Long id) {
this.id = id;
}

public java.lang.Integer Person.getVersion() {
return this.version;
}

public void Person.setVersion(java.lang.Integer version) {
this.version = version;
}

@org.springframework.transaction.annotation.Transactional
public void Person.persist() {
if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
this.entityManager.persist(this);
}

@org.springframework.transaction.annotation.Transactional
public void Person.remove() {
if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
this.entityManager.remove(this);
}

@org.springframework.transaction.annotation.Transactional
public void Person.flush() {
if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
this.entityManager.flush();
}

@org.springframework.transaction.annotation.Transactional
public void Person.merge() {
if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
Person merged = this.entityManager.merge(this);
this.entityManager.flush();
this.id = merged.getId();
}

public static long Person.countPeople() {
javax.persistence.EntityManager em = new Person().entityManager;
if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
return (Long) em.createQuery("select count(o) from Person o").getSingleResult();
}

public static java.util.List<Person> Person.findAllPeople() {
javax.persistence.EntityManager em = new Person().entityManager;
if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
return em.createQuery("select o from Person o").getResultList();
}

public static Person Person.findPerson(java.lang.Long id) {
if (id == null) throw new IllegalArgumentException("An identifier is required to retrieve an instance of Person");
javax.persistence.EntityManager em = new Person().entityManager;
if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
return em.find(Person.class, id);
}

public static java.util.List<Person> Person.findPersonEntries(int firstResult, int maxResults) {
javax.persistence.EntityManager em = new Person().entityManager;
if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
return em.createQuery("select o from Person o").setFirstResult(firstResult).setMaxResults(maxResults).getResultList();
}
@javax.persistence.PersistenceContext
transient javax.persistence.EntityManager Person.entityManager;

@javax.persistence.Id
@javax.persistence.GeneratedValue(strategy = javax.persistence.GenerationType.AUTO)
@javax.persistence.Column(name = "id")
private java.lang.Long Person.id;

@javax.persistence.Version
@javax.persistence.Column(name = "version")
private java.lang.Integer Person.version;

public java.lang.Long Person.getId() {
return this.id;
}

public void Person.setId(java.lang.Long id) {
this.id = id;
}

public java.lang.Integer Person.getVersion() {
return this.version;
}

public void Person.setVersion(java.lang.Integer version) {
this.version = version;
}

@org.springframework.transaction.annotation.Transactional
public void Person.persist() {
if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
this.entityManager.persist(this);
}

@org.springframework.transaction.annotation.Transactional
public void Person.remove() {
if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
this.entityManager.remove(this);
}

@org.springframework.transaction.annotation.Transactional
public void Person.flush() {
if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
this.entityManager.flush();
}

@org.springframework.transaction.annotation.Transactional
public void Person.merge() {
if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
Person merged = this.entityManager.merge(this);
this.entityManager.flush();
this.id = merged.getId();
}

public static long Person.countPeople() {
javax.persistence.EntityManager em = new Person().entityManager;
if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
return (Long) em.createQuery("select count(o) from Person o").getSingleResult();
}

public static java.util.List<Person> Person.findAllPeople() {
javax.persistence.EntityManager em = new Person().entityManager;
if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
return em.createQuery("select o from Person o").getResultList();
}

public static Person Person.findPerson(java.lang.Long id) {
if (id == null) throw new IllegalArgumentException("An identifier is required to retrieve an instance of Person");
javax.persistence.EntityManager em = new Person().entityManager;
if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
return em.find(Person.class, id);
}

public static java.util.List<Person> Person.findPersonEntries(int firstResult, int maxResults) {
javax.persistence.EntityManager em = new Person().entityManager;
if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
return em.createQuery("select o from Person o").setFirstResult(firstResult).setMaxResults(maxResults).getResultList();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void setPropertyValues(PropertyValues pvs, boolean ignoreUnknown, boolean
}


// Redefined with public visibility.
// Redefined with public visibility.
@Override
public Class getPropertyType(String propertyPath) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ public Object run() throws Exception {
}
}
else {
value = readMethod.invoke(object, (Object[]) null);
value = readMethod.invoke(object, (Object[]) null);
}

if (tokens.keys != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void doWith(Field field) {
if (fieldMap.containsKey(field.getName())) {
// ignore superclass declarations of fields already found in a subclass
}
else {
else {
fieldMap.put(field.getName(), field);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public interface PropertyAccessor {
* @see #setPropertyValues(PropertyValues, boolean, boolean)
*/
void setPropertyValues(PropertyValues pvs, boolean ignoreUnknown)
throws BeansException;
throws BeansException;

/**
* Perform a batch update with full control over behavior.
Expand All @@ -213,6 +213,6 @@ void setPropertyValues(PropertyValues pvs, boolean ignoreUnknown)
* successfully updated.
*/
void setPropertyValues(PropertyValues pvs, boolean ignoreUnknown, boolean ignoreInvalid)
throws BeansException;
throws BeansException;

}
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public void afterPropertiesSet() throws ClassNotFoundException, NoSuchFieldExcep
if (this.targetClass == null && this.targetObject == null) {
if (this.targetField != null) {
throw new IllegalArgumentException(
"Specify targetClass or targetObject in combination with targetField");
"Specify targetClass or targetObject in combination with targetField");
}

// If no other property specified, consider bean name as static field expression.
Expand Down
Loading

0 comments on commit 2cf45ba

Please sign in to comment.