You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@labs.apache.org by si...@apache.org on 2011/05/16 22:29:07 UTC
svn commit: r1103871 -
/labs/magma/trunk/website-velocity/src/main/java/org/apache/magma/website/velocity/FormatFields.aj
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: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org