Skip to content

Commit

Permalink
[WELD-810]; wrap isReadOnly method
Browse files Browse the repository at this point in the history
  • Loading branch information
alesj committed Jan 10, 2011
1 parent f14e0d5 commit 64556ac
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion impl/src/main/java/org/jboss/weld/el/WeldValueExpression.java
Expand Up @@ -25,7 +25,7 @@

/**
* @author pmuir
*
* @author alesj
*/
public class WeldValueExpression extends ForwardingValueExpression
{
Expand Down Expand Up @@ -83,6 +83,25 @@ public void setValue(ELContext context, Object value)
}
}

@Override
public boolean isReadOnly(ELContext context)
{
ELCreationalContextStack store = getCreationalContextStore(context);
try
{
store.push(new CreationalContextCallable());
return delegate().isReadOnly(context);
}
finally
{
CreationalContextCallable callable = store.pop();
if (callable.exists())
{
callable.get().release();
}
}
}

@SuppressWarnings("rawtypes")
@Override
public Class getType(ELContext context)
Expand Down

0 comments on commit 64556ac

Please sign in to comment.