Skip to content

Commit

Permalink
Bump XStream to 1.1.18 for better Java 16+ compatibility
Browse files Browse the repository at this point in the history
On Java 16+, users still need to run the cleaner with JVM parameter
'--add-opens java.base/java.util=ALL-UNNAMED', but that is way better than the
multiple '--add-opens' statements needed for XStream 1.4.8.
  • Loading branch information
kriegaex committed Oct 25, 2021
1 parent 960c0de commit 5a39042
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.8</version>
<version>1.4.18</version>
<exclusions>
<exclusion>
<artifactId>xmlpull</artifactId>
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/de/scrum_master/galileo/Book.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;

import com.thoughtworks.xstream.security.AnyTypePermission;
import de.scrum_master.util.SimpleLogger;

public class Book
Expand All @@ -23,6 +24,7 @@ public class Book
public final static XStream XSTREAM = new XStream(new DomDriver());

static {
XSTREAM.addPermission(AnyTypePermission.ANY);
XSTREAM.alias("galileo-openbooks", TreeMap.class);
XSTREAM.alias("book", Book.class);
XSTREAM.alias("id", String.class);
Expand Down

0 comments on commit 5a39042

Please sign in to comment.