You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2014/12/17 22:46:33 UTC

svn commit: r1646341 - in /myfaces/orchestra/trunk/core22: pom.xml src/main/java/org/apache/myfaces/orchestra/annotation/AnnotationInfoManager.java

Author: lu4242
Date: Wed Dec 17 21:46:32 2014
New Revision: 1646341

URL: http://svn.apache.org/r1646341
Log:
ORCHESTRA-67 Allow Orchestra annotations to be used in meta annotations (Thanks to Martin Maier-Moessner for provide this hint)

Modified:
    myfaces/orchestra/trunk/core22/pom.xml
    myfaces/orchestra/trunk/core22/src/main/java/org/apache/myfaces/orchestra/annotation/AnnotationInfoManager.java

Modified: myfaces/orchestra/trunk/core22/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core22/pom.xml?rev=1646341&r1=1646340&r2=1646341&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core22/pom.xml (original)
+++ myfaces/orchestra/trunk/core22/pom.xml Wed Dec 17 21:46:32 2014
@@ -69,7 +69,7 @@
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring</artifactId>
-      <version>2.0.6</version>
+      <version>2.5</version>
       <scope>compile</scope>
       <optional>true</optional>
     </dependency>
@@ -92,8 +92,8 @@
 
     <dependency>
       <groupId>org.springframework</groupId>
-      <artifactId>spring-mock</artifactId>
-      <version>2.0.6</version>
+      <artifactId>spring-test</artifactId>
+      <version>2.5</version>
       <scope>test</scope>
     </dependency>
 

Modified: myfaces/orchestra/trunk/core22/src/main/java/org/apache/myfaces/orchestra/annotation/AnnotationInfoManager.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core22/src/main/java/org/apache/myfaces/orchestra/annotation/AnnotationInfoManager.java?rev=1646341&r1=1646340&r2=1646341&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core22/src/main/java/org/apache/myfaces/orchestra/annotation/AnnotationInfoManager.java (original)
+++ myfaces/orchestra/trunk/core22/src/main/java/org/apache/myfaces/orchestra/annotation/AnnotationInfoManager.java Wed Dec 17 21:46:32 2014
@@ -30,6 +30,7 @@ import org.apache.myfaces.orchestra.view
 import org.apache.myfaces.orchestra.viewController.annotations.PreProcess;
 import org.apache.myfaces.orchestra.viewController.annotations.PreRenderView;
 import org.apache.myfaces.orchestra.viewController.annotations.ViewController;
+import org.springframework.core.annotation.AnnotationUtils;
 
 /**
  * Inspects a class for Orchestra annotations, and if found then caches this information
@@ -106,9 +107,11 @@ public class AnnotationInfoManager
      */
     public void processBeanAnnotations(String beanName, Class<?> clazz)
     {
-        ConversationName conversationName = (ConversationName) clazz.getAnnotation(ConversationName.class);
-        ViewController viewController = (ViewController) clazz.getAnnotation(ViewController.class);
-        ConversationRequire conversationRequire = (ConversationRequire) clazz.getAnnotation(ConversationRequire.class);
+        ConversationName conversationName = (ConversationName) AnnotationUtils.findAnnotation(
+                clazz, ConversationName.class);
+        ViewController viewController = (ViewController) AnnotationUtils.findAnnotation(clazz, ViewController.class);
+        ConversationRequire conversationRequire = (ConversationRequire) AnnotationUtils.findAnnotation(
+                clazz, ConversationRequire.class);
 
         if (conversationName == null && viewController == null && conversationRequire == null)
         {