You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2012/09/17 15:29:22 UTC
svn commit: r1386606 - in /camel/branches/camel-2.9.x: ./
camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java
Author: ningjiang
Date: Mon Sep 17 13:29:22 2012
New Revision: 1386606
URL: http://svn.apache.org/viewvc?rev=1386606&view=rev
Log:
CAMEL-5620 Fixed the ConverterTest error on windows by applying the patch from Alan
Modified:
camel/branches/camel-2.9.x/ (props changed)
camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java
Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Merged /camel/trunk:r1386495
Merged /camel/branches/camel-2.10.x:r1386595
Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java?rev=1386606&r1=1386605&r2=1386606&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java (original)
+++ camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java Mon Sep 17 13:29:22 2012
@@ -21,6 +21,7 @@ import java.beans.PropertyEditorSupport;
import java.io.File;
import java.io.InputStream;
import java.net.URL;
+import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -165,8 +166,8 @@ public class ConverterTest extends TestC
public void testFileToString() throws Exception {
URL resource = getClass().getResource("dummy.txt");
- assertNotNull("Cannot find resource!");
- File file = new File(resource.getFile());
+ assertNotNull("Cannot find resource!", resource);
+ File file = new File(URLDecoder.decode(resource.getFile(), "UTF-8"));
String text = converter.convertTo(String.class, file);
assertNotNull("Should have returned a String!", text);
text = text.trim();