mirror of
https://github.com/danieldemus/openhab-core.git
synced 2026-07-29 12:34:22 +02:00
Upgrade XStream to 1.4.20 (#3446)
This addresses CVE-2022-40151 and CVE-2022-41966, see: https://x-stream.github.io/changes.html#1.4.20 This version also fixes an issue with closing streams so the workaround in GenerateDefaultTranslationsMojoTest is no longer needed. Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
<dependency>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
<artifactId>xstream</artifactId>
|
||||
<version>1.4.19</version>
|
||||
<version>1.4.20</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
|
||||
+2
-9
@@ -105,15 +105,8 @@ public class GenerateDefaultTranslationsMojoTest {
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
public void afterEach() {
|
||||
try {
|
||||
Files.walk(tempPath).sorted(Comparator.reverseOrder()).map(Path::toFile).forEach(File::delete);
|
||||
} catch (IOException e) {
|
||||
// XStream does not close the HierarchicalStreamReader created in XStream.fromXML(URL)
|
||||
// which causes issues when deleting the temporary path on Windows.
|
||||
// See: https://github.com/x-stream/xstream/pull/287
|
||||
tempPath.toFile().deleteOnExit();
|
||||
}
|
||||
public void afterEach() throws IOException {
|
||||
Files.walk(tempPath).sorted(Comparator.reverseOrder()).map(Path::toFile).forEach(File::delete);
|
||||
}
|
||||
|
||||
private void assertSameProperties(Path expectedPath, Path actualPath) throws IOException {
|
||||
|
||||
Reference in New Issue
Block a user