camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <>
Subject [jira] [Commented] (CAMEL-8346) JsonPathEngine skips file encoding
Date Fri, 27 Feb 2015 08:27:05 GMT


Willem Jiang commented on CAMEL-8346:

Hi Stefan,

I just tried to apply the patch, but the test of testPriceResultTypeOnGenericFileISO88591
is failed.
java.lang.AssertionError: Assertion error at index 0 on mock mock://title with predicate:
Simple: body == Joseph und seine Brüder evaluated as: Joseph und seine Br�der == Joseph
und seine Brüder on Exchange[Message: Joseph und seine Br�der]
	at org.apache.camel.util.PredicateAssertHelper.assertMatches(
	at org.apache.camel.component.mock.AssertionClause.applyAssertionOn(
	at org.apache.camel.component.mock.MockEndpoint$
	at org.apache.camel.component.mock.MockEndpoint.doAssertIsSatisfied(
	at org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(
	at org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(
	at org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(
	at org.apache.camel.test.junit4.CamelTestSupport.assertMockEndpointsSatisfied(
	at org.apache.camel.jsonpath.JsonPathSourceTest.testPriceResultTypeOnGenericFileISO88591(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(
	at org.junit.internal.runners.statements.RunBefores.evaluate(
	at org.junit.internal.runners.statements.RunAfters.evaluate(
	at org.junit.rules.TestWatcher$1.evaluate(
	at org.junit.rules.RunRules.evaluate(
	at org.junit.runners.ParentRunner.runLeaf(
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(
	at org.junit.runners.ParentRunner$
	at org.junit.runners.ParentRunner$1.schedule(
	at org.junit.runners.ParentRunner.runChildren(
	at org.junit.runners.ParentRunner.access$000(
	at org.junit.runners.ParentRunner$2.evaluate(
	at org.junit.internal.runners.statements.RunAfters.evaluate(
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(

Can you double check it in you system?

> JsonPathEngine skips file encoding
> ----------------------------------
>                 Key: CAMEL-8346
>                 URL:
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jsonpath
>    Affects Versions: 2.14.1, 2.15.0
>            Reporter: Stefan Mandel
>             Fix For: 2.14.2, 2.15.0
>         Attachments:, germanbooks-iso-8859-1.json, germanbooks-utf8.json
> This occurs if one uses the camel file component with a charset parameter, e.g. file:/url?charset=UTF-8.
It leads to strange effects:
> # testing the same utf8-file under linux (default encoding:UTF-8) and german windows
(default encoding:windows-1252) leads to problems with german umlauts.
> # using a file in another encoding than the default (ISO-8859-1 on linux) leads also
to problems with german umlauts.
> - Both problems can be reproduced with the attached unit test files in 2.14.1.
> - Problem 1 is hidden in 2.15-SNAPSHOT, because UTF-8 is hard-coded as file encoding
(maybe ok, since JSON is almost never used with language specific encondings), Problem 2 also
occurs in 2.15-SNAPSHOT
> I can provide or help with a fix (or pull request), if these problems are classified
as true defects.

This message was sent by Atlassian JIRA

View raw message