diff --git a/pom.xml b/pom.xml index 74f7df0..da2c602 100644 --- a/pom.xml +++ b/pom.xml @@ -167,7 +167,7 @@ com.thoughtworks.xstream xstream - 1.4.7 + 1.4.19 com.google.code.gson diff --git a/src/main/java/org/sputnikdev/bluetooth/gattparser/spec/BluetoothGattSpecificationReader.java b/src/main/java/org/sputnikdev/bluetooth/gattparser/spec/BluetoothGattSpecificationReader.java index e916fbc..3491ff5 100644 --- a/src/main/java/org/sputnikdev/bluetooth/gattparser/spec/BluetoothGattSpecificationReader.java +++ b/src/main/java/org/sputnikdev/bluetooth/gattparser/spec/BluetoothGattSpecificationReader.java @@ -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; @@ -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; @@ -397,6 +394,8 @@ private Characteristic getCharacteristic(URL file) { private 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);