This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-karaf-3.x
in repository https://gitbox.apache.org/repos/asf/camel-karaf.git
The following commit(s) were added to refs/heads/camel-karaf-3.x by this push:
new f97173c5 CAMEL-19601: StreamCaching can configure allow/deny list of
classes to control what can be cached or not.
f97173c5 is described below
commit f97173c5e7a6d717bbf4b9f89fe294e676e71fe2
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Jul 13 14:33:10 2023 +0200
CAMEL-19601: StreamCaching can configure allow/deny list of classes to
control what can be cached or not.
---
.../camel/test/blueprint/BlueprintStreamCachingStrategyTest.java | 3 +++
.../apache/camel/test/blueprint/BlueprintStreamCachingStrategyTest.xml | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git
a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintStreamCachingStrategyTest.java
b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintStreamCachingStrategyTest.java
index b8a791a5..334c85e1 100644
---
a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintStreamCachingStrategyTest.java
+++
b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintStreamCachingStrategyTest.java
@@ -36,6 +36,9 @@ public class BlueprintStreamCachingStrategyTest extends
CamelBlueprintTestSuppor
assertEquals(normalizePath("target/cachedir"),
normalizePath(context.getStreamCachingStrategy().getSpoolDirectory().toString()));
assertEquals(Integer.valueOf(4096).intValue(),
context.getStreamCachingStrategy().getBufferSize());
assertEquals(Long.valueOf(8192).longValue(),
context.getStreamCachingStrategy().getSpoolThreshold());
+ assertEquals("java.io.ByteArrayInputStream",
+
context.getStreamCachingStrategy().getAllowClasses().iterator().next().getName());
+ assertEquals("java.io.Reader",
context.getStreamCachingStrategy().getDenyClasses().iterator().next().getName());
}
}
diff --git
a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/BlueprintStreamCachingStrategyTest.xml
b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/BlueprintStreamCachingStrategyTest.xml
index f043a6f0..a2515d9c 100644
---
a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/BlueprintStreamCachingStrategyTest.xml
+++
b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/BlueprintStreamCachingStrategyTest.xml
@@ -25,7 +25,8 @@
<camelContext streamCache="true"
xmlns="http://camel.apache.org/schema/blueprint">
- <streamCaching id="myCacheConfig" bufferSize="2048" spoolEnabled="true"
spoolDirectory="target/cachedir" spoolThreshold="8192"/>
+ <streamCaching id="myCacheConfig"
allowClasses="java.io.ByteArrayInputStream" denyClasses="java.io.Reader"
+ bufferSize="2048" spoolEnabled="true"
spoolDirectory="target/cachedir" spoolThreshold="8192"/>
<route>
<from uri="direct:c"/>