From 63a4d3dd9f7fc1214430aeea9b0474df32e8a043 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Fri, 17 Apr 2009 17:23:50 +0000 Subject: [PATCH] polishing git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@1020 50f2f4bb-b051-0410-bef5-90022cba6387 --- .../aop/aspectj/SimpleAspectInstanceFactory.java | 4 ++-- .../aop/aspectj/SingletonAspectInstanceFactory.java | 4 ++-- .../SimpleMetadataAwareAspectInstanceFactory.java | 7 +++---- .../SingletonMetadataAwareAspectInstanceFactory.java | 6 +++--- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/org.springframework.aop/src/main/java/org/springframework/aop/aspectj/SimpleAspectInstanceFactory.java b/org.springframework.aop/src/main/java/org/springframework/aop/aspectj/SimpleAspectInstanceFactory.java index 99a12565715..8c0f70fe986 100644 --- a/org.springframework.aop/src/main/java/org/springframework/aop/aspectj/SimpleAspectInstanceFactory.java +++ b/org.springframework.aop/src/main/java/org/springframework/aop/aspectj/SimpleAspectInstanceFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 the original author or authors. + * Copyright 2002-2009 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. @@ -84,7 +84,7 @@ public class SimpleAspectInstanceFactory implements AspectInstanceFactory { *

The default implementation simply returns Ordered.LOWEST_PRECEDENCE. * @param aspectClass the aspect class */ - protected int getOrderForAspectClass(Class aspectClass) { + protected int getOrderForAspectClass(Class aspectClass) { return Ordered.LOWEST_PRECEDENCE; } diff --git a/org.springframework.aop/src/main/java/org/springframework/aop/aspectj/SingletonAspectInstanceFactory.java b/org.springframework.aop/src/main/java/org/springframework/aop/aspectj/SingletonAspectInstanceFactory.java index 1820d5c0db8..53e86002240 100644 --- a/org.springframework.aop/src/main/java/org/springframework/aop/aspectj/SingletonAspectInstanceFactory.java +++ b/org.springframework.aop/src/main/java/org/springframework/aop/aspectj/SingletonAspectInstanceFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 the original author or authors. + * Copyright 2002-2009 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. @@ -74,7 +74,7 @@ public class SingletonAspectInstanceFactory implements AspectInstanceFactory { *

The default implementation simply returns Ordered.LOWEST_PRECEDENCE. * @param aspectClass the aspect class */ - protected int getOrderForAspectClass(Class aspectClass) { + protected int getOrderForAspectClass(Class aspectClass) { return Ordered.LOWEST_PRECEDENCE; } diff --git a/org.springframework.aop/src/main/java/org/springframework/aop/aspectj/annotation/SimpleMetadataAwareAspectInstanceFactory.java b/org.springframework.aop/src/main/java/org/springframework/aop/aspectj/annotation/SimpleMetadataAwareAspectInstanceFactory.java index 07d3b456dec..33d19a8811b 100644 --- a/org.springframework.aop/src/main/java/org/springframework/aop/aspectj/annotation/SimpleMetadataAwareAspectInstanceFactory.java +++ b/org.springframework.aop/src/main/java/org/springframework/aop/aspectj/annotation/SimpleMetadataAwareAspectInstanceFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 the original author or authors. + * Copyright 2002-2009 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. @@ -57,8 +57,8 @@ public class SimpleMetadataAwareAspectInstanceFactory extends SimpleAspectInstan * @param aspectClass the aspect class */ @Override - protected int getOrderForAspectClass(Class aspectClass) { - Order order = (Order) aspectClass.getAnnotation(Order.class); + protected int getOrderForAspectClass(Class aspectClass) { + Order order = aspectClass.getAnnotation(Order.class); if (order != null) { return order.value(); } @@ -66,4 +66,3 @@ public class SimpleMetadataAwareAspectInstanceFactory extends SimpleAspectInstan } } - diff --git a/org.springframework.aop/src/main/java/org/springframework/aop/aspectj/annotation/SingletonMetadataAwareAspectInstanceFactory.java b/org.springframework.aop/src/main/java/org/springframework/aop/aspectj/annotation/SingletonMetadataAwareAspectInstanceFactory.java index 4f619d21d10..aa279de07c9 100644 --- a/org.springframework.aop/src/main/java/org/springframework/aop/aspectj/annotation/SingletonMetadataAwareAspectInstanceFactory.java +++ b/org.springframework.aop/src/main/java/org/springframework/aop/aspectj/annotation/SingletonMetadataAwareAspectInstanceFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 the original author or authors. + * Copyright 2002-2009 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. @@ -58,8 +58,8 @@ public class SingletonMetadataAwareAspectInstanceFactory extends SingletonAspect * @see org.springframework.core.annotation.Order */ @Override - protected int getOrderForAspectClass(Class aspectClass) { - Order order = (Order) aspectClass.getAnnotation(Order.class); + protected int getOrderForAspectClass(Class aspectClass) { + Order order = aspectClass.getAnnotation(Order.class); if (order != null) { return order.value(); }