private static Object parseExpression(String expression) throws OgnlException { try { Node node = expressionCache.get(expression); if (node == null) { node = new OgnlParser(new StringReader(expression)).topLevelExpression(); expressionCache.put(expression, node); } return node; } catch (ParseException e) { throw new ExpressionSyntaxException(expression, e); } catch (TokenMgrError e) { throw new ExpressionSyntaxException(expression, e); } }
private static Object parseExpression(String expression) throws OgnlException { try { Node node = expressionCache.get(expression); if (node == null) { node = new OgnlParser(new StringReader(expression)) .topLevelExpression(); expressionCache.put(expression, node); } return node; } catch (ParseException e) { throw new ExpressionSyntaxException(expression, e); } catch (TokenMgrError e) { throw new ExpressionSyntaxException(expression, e); } }
/** * Parses the given OGNL expression and returns a tree representation of the * expression that can be used by <CODE>Ognl</CODE> static methods. * * @param expression the OGNL expression to be parsed * @return a tree representation of the expression * @throws ExpressionSyntaxException if the expression is malformed * @throws OgnlException if there is a pathological environmental problem */ public static Object parseExpression( String expression ) throws OgnlException { try { OgnlParser parser = new OgnlParser( new StringReader(expression) ); return parser.topLevelExpression(); } catch (ParseException e) { throw new ExpressionSyntaxException( expression, e ); } catch (TokenMgrError e) { throw new ExpressionSyntaxException( expression, e ); } }
/** * Parses the given OGNL expression and returns a tree representation of the expression that can * be used by <CODE>Ognl</CODE> static methods. * * @param expression * the OGNL expression to be parsed * @return a tree representation of the expression * @throws ExpressionSyntaxException * if the expression is malformed * @throws OgnlException * if there is a pathological environmental problem */ public static Object parseExpression(String expression) throws OgnlException { try { OgnlParser parser = new OgnlParser(new StringReader(expression)); return parser.topLevelExpression(); } catch (ParseException e) { throw new ExpressionSyntaxException(expression, e); } catch (TokenMgrError e) { throw new ExpressionSyntaxException(expression, e); } }
/** * Parses the given OGNL expression and returns a tree representation of the expression that can * be used by <CODE>Ognl</CODE> static methods. * * @param expression * the OGNL expression to be parsed * @return a tree representation of the expression * @throws ExpressionSyntaxException * if the expression is malformed * @throws OgnlException * if there is a pathological environmental problem */ public static Object parseExpression(String expression) throws OgnlException { try { OgnlParser parser = new OgnlParser(new StringReader(expression)); return parser.topLevelExpression(); } catch (ParseException e) { throw new ExpressionSyntaxException(expression, e); } catch (TokenMgrError e) { throw new ExpressionSyntaxException(expression, e); } }