Browse Source

Polish whitespace in *.aj

Previously we had restored the whitespace for *.aj files in 6888a6f28
to avoid a but in aspectj.

We have updated to the latest version of apsectj and restored the
changes in commit 6888a6f28 which included a significant cleanup of
whitespace.

Issue: SPR-10208
pull/241/head
Rob Winch 13 years ago
parent
commit
21a49ef4c5
  1. 2
      build.gradle
  2. 2
      spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractBeanConfigurerAspect.aj
  3. 2
      spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractDependencyInjectionAspect.aj
  4. 22
      spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractInterfaceDrivenDependencyInjectionAspect.aj
  5. 4
      spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AnnotationBeanConfigurerAspect.aj
  6. 2
      spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/GenericInterfaceDrivenDependencyInjectionAspect.aj
  7. 2
      spring-aspects/src/main/java/org/springframework/mock/staticmock/AnnotationDrivenStaticEntityMockingControl.aj
  8. 13
      spring-aspects/src/main/java/org/springframework/orm/jpa/aspectj/JpaExceptionTranslatorAspect.aj
  9. 2
      spring-aspects/src/main/java/org/springframework/transaction/aspectj/AbstractTransactionAspect.aj

2
build.gradle

@ -12,7 +12,7 @@ configure(allprojects) { project -> @@ -12,7 +12,7 @@ configure(allprojects) { project ->
group = "org.springframework"
version = qualifyVersionIfNecessary(version)
ext.aspectjVersion = "1.7.1"
ext.aspectjVersion = "1.7.2"
ext.easymockVersion = "2.5.2"
ext.hsqldbVersion = "1.8.0.10"
ext.junitVersion = "4.11"

2
spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractBeanConfigurerAspect.aj

@ -25,7 +25,7 @@ import org.springframework.beans.factory.wiring.BeanConfigurerSupport; @@ -25,7 +25,7 @@ import org.springframework.beans.factory.wiring.BeanConfigurerSupport;
* pointcut in subaspects.
*
* <p>Subaspects may also need a metadata resolution strategy, in the
* <code>BeanWiringInfoResolver</code> interface. The default implementation
* {@code BeanWiringInfoResolver} interface. The default implementation
* looks for a bean with the same name as the FQN. This is the default name
* of a bean in a Spring container if the id value is not supplied explicitly.
*

2
spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractDependencyInjectionAspect.aj

@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
package org.springframework.beans.factory.aspectj;
import org.aspectj.lang.annotation.SuppressAjWarnings;
import org.aspectj.lang.annotation.control.CodeGenerationHint;
/**
* Abstract base aspect that can perform Dependency
@ -51,6 +52,7 @@ public abstract aspect AbstractDependencyInjectionAspect { @@ -51,6 +52,7 @@ public abstract aspect AbstractDependencyInjectionAspect {
* Select the most-specific initialization join point
* (most concrete class) for the initialization of an instance.
*/
@CodeGenerationHint(ifNameSuffix="6f1")
public pointcut mostSpecificSubTypeConstruction() :
if(thisJoinPoint.getSignature().getDeclaringType() == thisJoinPoint.getThis().getClass());

22
spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractInterfaceDrivenDependencyInjectionAspect.aj

@ -29,8 +29,8 @@ import java.io.Serializable; @@ -29,8 +29,8 @@ import java.io.Serializable;
* <p>
* There are two cases that needs to be handled:
* <ol>
* <li>Normal object creation via the '<code>new</code>' operator: this is
* taken care of by advising <code>initialization()</code> join points.</li>
* <li>Normal object creation via the '{@code new}' operator: this is
* taken care of by advising {@code initialization()} join points.</li>
* <li>Object creation through deserialization: since no constructor is
* invoked during deserialization, the aspect needs to advise a method that a
* deserialization mechanism is going to invoke. Ideally, we should not
@ -41,21 +41,21 @@ import java.io.Serializable; @@ -41,21 +41,21 @@ import java.io.Serializable;
* introduced implementation). There are a few choices for the chosen method:
* <ul>
* <li>readObject(ObjectOutputStream): Java requires that the method must be
* <code>private</p>. Since aspects cannot introduce a private member,
* {@code private}</p>. Since aspects cannot introduce a private member,
* while preserving its name, this option is ruled out.</li>
* <li>readResolve(): Java doesn't pose any restriction on an access specifier.
* Problem solved! There is one (minor) limitation of this approach in
* that if a user class already has this method, that method must be
* <code>public</code>. However, this shouldn't be a big burden, since
* {@code public}. However, this shouldn't be a big burden, since
* use cases that need classes to implement readResolve() (custom enums,
* for example) are unlikely to be marked as &#64;Configurable, and
* in any case asking to make that method <code>public</code> should not
* in any case asking to make that method {@code public} should not
* pose any undue burden.</li>
* </ul>
* The minor collaboration needed by user classes (i.e., that the
* implementation of <code>readResolve()</code>, if any, must be
* <code>public</code>) can be lifted as well if we were to use an
* experimental feature in AspectJ - the <code>hasmethod()</code> PCD.</li>
* implementation of {@code readResolve()}, if any, must be
* {@code public}) can be lifted as well if we were to use an
* experimental feature in AspectJ - the {@code hasmethod()} PCD.</li>
* </ol>
* <p>
@ -103,17 +103,17 @@ public abstract aspect AbstractInterfaceDrivenDependencyInjectionAspect extends @@ -103,17 +103,17 @@ public abstract aspect AbstractInterfaceDrivenDependencyInjectionAspect extends
ConfigurableObject+ && Serializable+ implements ConfigurableDeserializationSupport;
/**
* A marker interface to which the <code>readResolve()</code> is introduced.
* A marker interface to which the {@code readResolve()} is introduced.
*/
static interface ConfigurableDeserializationSupport extends Serializable {
}
/**
* Introduce the <code>readResolve()</code> method so that we can advise its
* Introduce the {@code readResolve()} method so that we can advise its
* execution to configure the object.
*
* <p>Note if a method with the same signature already exists in a
* <code>Serializable</code> class of ConfigurableObject type,
* {@code Serializable} class of ConfigurableObject type,
* that implementation will take precedence (a good thing, since we are
* merely interested in an opportunity to detect deserialization.)
*/

4
spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AnnotationBeanConfigurerAspect.aj

@ -18,6 +18,7 @@ package org.springframework.beans.factory.aspectj; @@ -18,6 +18,7 @@ package org.springframework.beans.factory.aspectj;
import java.io.Serializable;
import org.aspectj.lang.annotation.control.CodeGenerationHint;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
@ -32,7 +33,7 @@ import org.springframework.beans.factory.wiring.BeanConfigurerSupport; @@ -32,7 +33,7 @@ import org.springframework.beans.factory.wiring.BeanConfigurerSupport;
* annotation to identify which classes need autowiring.
*
* <p>The bean name to look up will be taken from the
* <code>&#64;Configurable</code> annotation if specified, otherwise the
* {@code &#64;Configurable} annotation if specified, otherwise the
* default bean name to look up will be the FQN of the class being configured.
*
* @author Rod Johnson
@ -77,6 +78,7 @@ public aspect AnnotationBeanConfigurerAspect @@ -77,6 +78,7 @@ public aspect AnnotationBeanConfigurerAspect
/*
* An intermediary to match preConstructionConfiguration signature (that doesn't expose the annotation object)
*/
@CodeGenerationHint(ifNameSuffix="bb0")
private pointcut preConstructionConfigurationSupport(Configurable c) : @this(c) && if(c.preConstruction());
/*

2
spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/GenericInterfaceDrivenDependencyInjectionAspect.aj

@ -22,7 +22,7 @@ package org.springframework.beans.factory.aspectj; @@ -22,7 +22,7 @@ package org.springframework.beans.factory.aspectj;
* the use of the &#64;Configurable annotation.
*
* The subaspect of this aspect doesn't need to include any AOP constructs.
* For example, here is a subaspect that configures the <code>PricingStrategyClient</code> objects.
* For example, here is a subaspect that configures the {@code PricingStrategyClient} objects.
* <pre>
* aspect PricingStrategyDependencyInjectionAspect
* extends GenericInterfaceDrivenDependencyInjectionAspect<PricingStrategyClient> {

2
spring-aspects/src/main/java/org/springframework/mock/staticmock/AnnotationDrivenStaticEntityMockingControl.aj

@ -18,7 +18,7 @@ package org.springframework.mock.staticmock; @@ -18,7 +18,7 @@ package org.springframework.mock.staticmock;
/**
* Annotation-based aspect to use in test build to enable mocking static methods
* on JPA-annotated <code>@Entity</code> classes, as used by Roo for finders.
* on JPA-annotated {@code @Entity} classes, as used by Roo for finders.
*
* <p>Mocking will occur in the call stack of any method in a class (typically a test class)
* that is annotated with the @MockStaticEntityMethods annotation.

13
spring-aspects/src/main/java/org/springframework/orm/jpa/aspectj/JpaExceptionTranslatorAspect.aj

@ -1,3 +1,16 @@ @@ -1,3 +1,16 @@
/*
* Copyright 2002-2013 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. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package org.springframework.orm.jpa.aspectj;
import javax.persistence.EntityManager;

2
spring-aspects/src/main/java/org/springframework/transaction/aspectj/AbstractTransactionAspect.aj

@ -23,7 +23,7 @@ import org.springframework.transaction.interceptor.TransactionAttributeSource; @@ -23,7 +23,7 @@ import org.springframework.transaction.interceptor.TransactionAttributeSource;
/**
* Abstract superaspect for AspectJ transaction aspects. Concrete
* subaspects will implement the <code>transactionalMethodExecution()</code>
* subaspects will implement the {@code transactionalMethodExecution()}
* pointcut using a strategy such as Java 5 annotations.
*
* <p>Suitable for use inside or outside the Spring IoC container.

Loading…
Cancel
Save