[jboss-cvs] jboss-seam/src/main/org/jboss/seam/bpm ...

Norman Richards norman.richards at jboss.com
Sat Sep 29 13:24:22 EDT 2007


  User: nrichards
  Date: 07/09/29 13:24:22

  Modified:    src/main/org/jboss/seam/bpm  SeamExpressionEvaluator.java
  Log:
  JBSEAM-1937
  
  Revision  Changes    Path
  1.3       +76 -75    jboss-seam/src/main/org/jboss/seam/bpm/SeamExpressionEvaluator.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: SeamExpressionEvaluator.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/bpm/SeamExpressionEvaluator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- SeamExpressionEvaluator.java	16 Jul 2007 10:22:53 -0000	1.2
  +++ SeamExpressionEvaluator.java	29 Sep 2007 17:24:22 -0000	1.3
  @@ -25,7 +25,8 @@
    * @author Gavin King
    *
    */
  -public class SeamExpressionEvaluator extends ExpressionEvaluator
  +public class SeamExpressionEvaluator 
  +    extends ExpressionEvaluator
   {
   
      @Override
  @@ -44,41 +45,41 @@
   
      private static Expression createExpression(final String expression, final Class returnType, final FunctionMapper mapper)
      {
  -      return new Expression()
  -      {
  +        return 
  +            new Expression() {
            private MethodExpression me;
            private ValueExpression ve; 
            
  -         private void initMethodExpression()
  -         {
  +                private void initMethodExpression() {
               me = EL.EXPRESSION_FACTORY.createMethodExpression(EL.EL_CONTEXT, expression, returnType, new Class[0]);
            }
            
  -         private void initValueExpression()
  -         {
  +                private void initValueExpression() {
               ve = EL.EXPRESSION_FACTORY.createValueExpression(EL.EL_CONTEXT, expression, returnType);
            }
            
            @Override
            public Object evaluate(VariableResolver resolver) throws ELException
            {
  -            try
  -            {
  -               try
  -               {
  -                  if (me==null && ve==null) initMethodExpression();
  -                  if (me!=null && ve==null) return me.invoke( createELContext(resolver, mapper), new Object[0] );
  +                    try {
  +                        try {
  +                            if (me==null && ve==null) {
  +                                initMethodExpression();
  +                            }
  +                            if (me!=null && ve==null) {
  +                                return me.invoke(createELContext(resolver, mapper), new Object[0]);
  +                            }
  +                        } catch (javax.el.ELException e) {                                    
  +                            if (ve==null) {
  +                                initValueExpression();
                  }
  -               catch (javax.el.MethodNotFoundException mnfe)
  -               {
  -                  if (ve==null) initValueExpression();
  -                  if (ve!=null) return ve.getValue( createELContext(resolver, mapper) );
  +                            if (ve!=null) {
  +                                return ve.getValue(createELContext(resolver, mapper));
                  }
  -               throw new ELException();
               }
  -            catch (javax.el.ELException vele)
  -            {
  -               throw new ELException(vele);
  +                        throw new ELException();
  +                    } catch (javax.el.ELException e) {
  +                        throw new ELException(e);
               }
            }
         };
  
  
  



More information about the jboss-cvs-commits mailing list