Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

camel-jclouds: StackOverflowError if body is FileInputStreamCache

$
0
0
Hi all,

I think I found a bug in the camel-jclouds implementation (tested in version
2.10.7 and 2.14.0)
If the body of the message an instance of FileInputStreamCache, the
Converter
toPayload(InputStream is, Exchange exchange)
in
org.apache.camel.component.jclouds.JcloudsPayloadConverter
runs into an endless recursion.

The following test case produces the error (add to the
JcloudsBlobStoreProducerTest)

@Test
public void testBlobStorePutFileInputStreamCache() throws
InterruptedException, CamelExecutionException, IOException {
MockEndpoint mockEndpoint = resolveMandatoryEndpoint("mock:results",
MockEndpoint.class);
mockEndpoint.expectedMessageCount(1);

File f = File.createTempFile("temp", ".txt");
FileInputStreamCache fis = new FileInputStreamCache(f);
template.sendBody("direct:put", fis);

mockEndpoint.assertIsSatisfied();

I ran into this issue when trying to send files (1MB) i got from camel-jetty
to camel-jclouds.

Viewing all articles
Browse latest Browse all 5648

Trending Articles