Skip to content

Commit d8b8bab

Browse files
committed
Update Xstream to version 1.4.19
1 parent a396796 commit d8b8bab

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ allprojects {
9898
sqliteVersion = '3.32.3.3'
9999
woodstoxVersion = '6.2.8'
100100
xmlunitVersion = '2.8.4'
101-
xstreamVersion = '1.4.16'
101+
xstreamVersion = '1.4.19'
102102
jrubyVersion = '1.7.27'
103103
beanshellVersion = '2.0b5'
104104
jaxbApiVersion = '2.3.1'

spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/XStreamExecutionContextStringSerializer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2018 the original author or authors.
2+
* Copyright 2006-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -78,6 +78,7 @@ public synchronized void init() throws Exception {
7878
else {
7979
xstream = new XStream(reflectionProvider, hierarchicalStreamDriver);
8080
}
81+
xstream.allowTypesByRegExp(new String[]{"org.springframework.batch.*"});
8182
}
8283

8384
/**

spring-batch-samples/src/main/resources/jobs/iosample/xml.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@
2828
<entry key="name" value="java.lang.String" />
2929
</util:map>
3030
</property>
31+
<property name="typePermissions">
32+
<bean class="com.thoughtworks.xstream.security.ExplicitTypePermission">
33+
<constructor-arg>
34+
<util:list>
35+
<value>org.springframework.batch.sample.domain.trade.CustomerCredit</value>
36+
</util:list>
37+
</constructor-arg>
38+
</bean>
39+
</property>
3140
</bean>
3241

3342
<bean id="outputResource" class="org.springframework.core.io.FileSystemResource">

0 commit comments

Comments
 (0)