Author: simoneg
Date: Mon May 16 20:29:07 2011
New Revision: 1103871

URL: http://svn.apache.org/viewvc?rev=1103871&view=rev
Log:
Added a check in case of erreoneous call on a non properly inited bean

Modified:
    
labs/magma/trunk/website-velocity/src/main/java/org/apache/magma/website/velocity/FormatFields.aj

Modified: 
labs/magma/trunk/website-velocity/src/main/java/org/apache/magma/website/velocity/FormatFields.aj
URL: 
http://svn.apache.org/viewvc/labs/magma/trunk/website-velocity/src/main/java/org/apache/magma/website/velocity/FormatFields.aj?rev=1103871&r1=1103870&r2=1103871&view=diff
==============================================================================
--- 
labs/magma/trunk/website-velocity/src/main/java/org/apache/magma/website/velocity/FormatFields.aj
 (original)
+++ 
labs/magma/trunk/website-velocity/src/main/java/org/apache/magma/website/velocity/FormatFields.aj
 Mon May 16 20:29:07 2011
@@ -26,6 +26,7 @@ import org.aspectj.lang.reflect.MethodSi
 import org.apache.commons.lang.StringEscapeUtils;
 
 // TODO change this to use pieces
+// FIXME I don't think this works for more than one field in the same VM : it 
handles a single field for each rendering() flow!
 public aspect FormatFields percflow(rendering(Head)) {
 
        pointcut rendering(Head head) : 
@@ -43,6 +44,7 @@ public aspect FormatFields percflow(rend
 
     after (MagmaBeanSupport bean, Head head) returning (Object val): 
calledForRendering(bean, head) {
        BeanData beanData = bean.beanData();
+       if (beandata == null) return;
        PropertyInfo property = 
beanData.findProperty(((MethodSignature)thisJoinPointStaticPart.getSignature()).getMethod());
        ret = val;
        if (property == null) {                 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to