[jboss-cvs] jboss-seam/src/main/org/jboss/seam/bpm ...
Peter Muir
peter at bleepbleep.org.uk
Sat Nov 24 17:12:18 EST 2007
User: pmuir
Date: 07/11/24 17:12:18
Modified: src/main/org/jboss/seam/bpm SeamExpressionEvaluator.java
Log:
WS
Revision Changes Path
1.4 +49 -38 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.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- SeamExpressionEvaluator.java 29 Sep 2007 17:24:22 -0000 1.3
+++ SeamExpressionEvaluator.java 24 Nov 2007 22:12:18 -0000 1.4
@@ -45,16 +45,18 @@
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);
}
@@ -63,22 +65,30 @@
{
try {
try {
- if (me==null && ve==null) {
+ if (me==null && ve==null)
+ {
initMethodExpression();
}
- if (me!=null && ve==null) {
+ if (me!=null && ve==null)
+ {
return me.invoke(createELContext(resolver, mapper), new Object[0]);
}
- } catch (javax.el.ELException e) {
- if (ve==null) {
+ }
+ catch (javax.el.ELException e)
+ {
+ if (ve==null)
+ {
initValueExpression();
}
- if (ve!=null) {
+ if (ve!=null)
+ {
return ve.getValue(createELContext(resolver, mapper));
}
}
throw new ELException();
- } catch (javax.el.ELException e) {
+ }
+ catch (javax.el.ELException e)
+ {
throw new ELException(e);
}
}
@@ -87,7 +97,8 @@
private static javax.el.FunctionMapper decorateFunctionMapper(final FunctionMapper functionMapper)
{
- return new SeamFunctionMapper( new javax.el.FunctionMapper() {
+ return new SeamFunctionMapper( new javax.el.FunctionMapper()
+ {
@Override
public Method resolveFunction(String prefix, String localName)
{
More information about the jboss-cvs-commits
mailing list