Skip to content

Commit cd239f9

Browse files
committed
support newer xstream
1 parent 82940cb commit cd239f9

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
<dependency>
168168
<groupId>com.thoughtworks.xstream</groupId>
169169
<artifactId>xstream</artifactId>
170-
<version>1.4.7</version>
170+
<version>1.4.19</version>
171171
</dependency>
172172
<dependency>
173173
<groupId>com.google.code.gson</groupId>

src/main/java/org/sputnikdev/bluetooth/gattparser/spec/BluetoothGattSpecificationReader.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,10 @@
2929
import org.slf4j.LoggerFactory;
3030

3131
import java.io.File;
32-
import java.io.FilenameFilter;
3332
import java.io.IOException;
3433
import java.io.InputStreamReader;
3534
import java.lang.reflect.Type;
3635
import java.net.MalformedURLException;
37-
import java.net.URISyntaxException;
3836
import java.net.URL;
3937
import java.util.ArrayList;
4038
import java.util.Collection;
@@ -44,7 +42,6 @@
4442
import java.util.Iterator;
4543
import java.util.List;
4644
import java.util.Map;
47-
import java.util.Scanner;
4845
import java.util.Set;
4946
import java.util.stream.Collectors;
5047

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

0 commit comments

Comments
 (0)