commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 정경택 (JIRA) <j...@apache.org>
Subject [jira] [Created] (OGNL-251) ognl expression not support other language
Date Fri, 02 Oct 2015 07:46:26 GMT
정경택 created OGNL-251:
------------------------

             Summary: ognl expression not support other language 
                 Key: OGNL-251
                 URL: https://issues.apache.org/jira/browse/OGNL-251
             Project: Commons OGNL
          Issue Type: Bug
            Reporter: 정경택


@Test
public void testKoreanInExpression() throws Exception
{
  String expressiosn = "성명 != '' ";
  Object expr = Ognl.parseExpression(expressiosn);
  OgnlContext ctx = new OgnlContext();
  String str = "name";
  ctx.put("성명", str);
  Object value = Ognl.getValue(expr, ctx);
  assertTrue((Boolean)value);
}

====================================
Caused by: org.apache.ibatis.ognl.ExpressionSyntaxException: Malformed OGNL expression: 성명!=
"" [org.apache.ibatis.ognl.TokenMgrError: Lexical error at line 1, column 2. Encountered:
"\uc131" (49457), after : ""]
at org.apache.ibatis.ognl.Ognl.parseExpression(Ognl.java:114)
at org.apache.ibatis.scripting.xmltags.OgnlCache.parseExpression(OgnlCache.java:53)
at org.apache.ibatis.scripting.xmltags.OgnlCache.getValue(OgnlCache.java:44)
... 63 more
Caused by: org.apache.ibatis.ognl.TokenMgrError: Lexical error at line 1, column 2. Encountered:
"\uc131" (49457), after : ""
at org.apache.ibatis.ognl.OgnlParserTokenManager.getNextToken(OgnlParserTokenManager.java:1539)
at org.apache.ibatis.ognl.OgnlParser.jj_ntk(OgnlParser.java:3099)
at org.apache.ibatis.ognl.OgnlParser.unaryExpression(OgnlParser.java:1079)
at org.apache.ibatis.ognl.OgnlParser.multiplicativeExpression(OgnlParser.java:971)
at org.apache.ibatis.ognl.OgnlParser.additiveExpression(OgnlParser.java:894)
at org.apache.ibatis.ognl.OgnlParser.shiftExpression(OgnlParser.java:750)
at org.apache.ibatis.ognl.OgnlParser.relationalExpression(OgnlParser.java:508)
at org.apache.ibatis.ognl.OgnlParser.equalityExpression(OgnlParser.java:405)
at org.apache.ibatis.ognl.OgnlParser.andExpression(OgnlParser.java:352)
at org.apache.ibatis.ognl.OgnlParser.exclusiveOrExpression(OgnlParser.java:299)
at org.apache.ibatis.ognl.OgnlParser.inclusiveOrExpression(OgnlParser.java:246)
at org.apache.ibatis.ognl.OgnlParser.logicalAndExpression(OgnlParser.java:193)
at org.apache.ibatis.ognl.OgnlParser.logicalOrExpression(OgnlParser.java:140)
at org.apache.ibatis.ognl.OgnlParser.conditionalTestExpression(OgnlParser.java:101)
at org.apache.ibatis.ognl.OgnlParser.assignmentExpression(OgnlParser.java:64)
at org.apache.ibatis.ognl.OgnlParser.expression(OgnlParser.java:23)
at org.apache.ibatis.ognl.OgnlParser.topLevelExpression(OgnlParser.java:15)
at org.apache.ibatis.ognl.Ognl.parseExpression(Ognl.java:110)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message