Skip to content

Commit

Permalink
support newer xstream
Browse files Browse the repository at this point in the history
  • Loading branch information
PRosenb committed May 22, 2022
1 parent 82940cb commit cd239f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.7</version>
<version>1.4.19</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@
import org.slf4j.LoggerFactory;

import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Type;
import java.net.MalformedURLException;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
Expand All @@ -44,7 +42,6 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -397,6 +394,8 @@ private Characteristic getCharacteristic(URL file) {
private <T> T getSpec(URL file) {
try {
XStream xstream = new XStream(new DomDriver());
xstream.allowTypesByWildcard(
new String[]{getClass().getPackage().getName() + ".*"});
xstream.autodetectAnnotations(true);
xstream.processAnnotations(Bit.class);
xstream.processAnnotations(BitField.class);
Expand Down

0 comments on commit cd239f9

Please sign in to comment.