commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Biestro (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (JEXL-158) Handle locale decimal separators correctly
Date Fri, 26 Jun 2015 11:28:04 GMT

     [ https://issues.apache.org/jira/browse/JEXL-158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Henri Biestro resolved JEXL-158.
--------------------------------
    Resolution: Fixed

src/main/java/org/apache/commons/jexl3/parser/ASTNumberLiteral.java
src/main/java/org/apache/commons/jexl3/parser/NumberParser.java

Committed revision 1687760.

JEXL:
Fixing JEXL-158, using EN locale based format when stringifying a big decimal

> Handle locale decimal separators correctly
> ------------------------------------------
>
>                 Key: JEXL-158
>                 URL: https://issues.apache.org/jira/browse/JEXL-158
>             Project: Commons JEXL
>          Issue Type: Bug
>    Affects Versions: 3.0
>         Environment: Debian Jessie 8.1 64 Bit 
> Maven 3.0.5-3 
> OpenJDK 7u79-2.5.5-1~deb8u1 
> German language
>            Reporter: Lars Cebulla
>            Priority: Blocker
>
> Hi,
> running ArithmeticTest in a German environment, the methods testBigLiteralValue and testBigLiterals
fail.
> testBigLiteralValue's Exception:
> java.lang.RuntimeException: check parse failed: 9223372036854775806,5b /******** */ 9223372036854775806.5B
> 	at org.apache.commons.jexl3.internal.Util.debuggerCheck(Util.java:72)
> 	at org.apache.commons.jexl3.JexlTestCase.debuggerCheck(JexlTestCase.java:71)
> 	at org.apache.commons.jexl3.JexlTestCase.tearDown(JexlTestCase.java:57)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:606)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
> 	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> 	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
> Caused by: org.apache.commons.jexl3.JexlException$Parsing: sun.reflect.NativeMethodAccessorImpl.invoke0@1:20
parsing error in ','
> 	... 25 more
> testBigLiterals' Exception:
> java.lang.RuntimeException: check parse failed: {
>     a = 10h;
>     b = 10h;
>     c = 42,0b;
>     d = 42,0b;
> } /******** */ {a = 10H; b = 10h; c = 42.0B; d = 42.0b;}
> 	at org.apache.commons.jexl3.internal.Util.debuggerCheck(Util.java:72)
> 	at org.apache.commons.jexl3.JexlTestCase.debuggerCheck(JexlTestCase.java:71)
> 	at org.apache.commons.jexl3.JexlTestCase.tearDown(JexlTestCase.java:57)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:606)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
> 	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> 	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
> Caused by: org.apache.commons.jexl3.JexlException$Parsing: sun.reflect.NativeMethodAccessorImpl.invoke0@4:11
parsing error in ','
> 	... 25 more
> If I change system's language to English, everything is fine.
> In Germany we use ',' as decimal separator!



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

Mime
View raw message