Skip to content

Commit 6916474

Browse files
author
poison
committed
catch up with vdf changes
2 parents f8bc3a3 + 4d434ba commit 6916474

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

pom.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<dependency>
1010
<groupId>com.fasterxml.jackson.core</groupId>
1111
<artifactId>jackson-databind</artifactId>
12-
<version>2.1.5</version>
12+
<version>2.9.6</version>
1313
<type>jar</type>
1414
</dependency>
1515
<dependency>
@@ -36,7 +36,7 @@
3636
<dependency>
3737
<groupId>com.google.guava</groupId>
3838
<artifactId>guava</artifactId>
39-
<version>25.1-jre</version>
39+
<version>26.0-jre</version>
4040
</dependency>
4141
<dependency>
4242
<groupId>com.technofovea</groupId>
@@ -59,6 +59,11 @@
5959
<version>6.14.3</version>
6060
<scope>test</scope>
6161
</dependency>
62+
<dependency>
63+
<groupId>commons-beanutils</groupId>
64+
<artifactId>commons-beanutils</artifactId>
65+
<version>1.9.3</version>
66+
</dependency>
6267
</dependencies>
6368
<properties>
6469
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

src/main/java/com/ignorelist/kassandra/steam/scraper/SharedConfig.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import java.util.Set;
2828
import org.antlr.runtime.RecognitionException;
2929
import org.apache.commons.io.IOUtils;
30+
import org.apache.commons.jxpath.ClassFunctions;
3031
import org.apache.commons.jxpath.JXPathContext;
3132

3233
/**
@@ -91,7 +92,8 @@ public synchronized VdfNode getAppsNode() {
9192
}
9293
try {
9394
JXPathContext pathContext=JXPathContext.newContext(getRootNode());
94-
appsNode=(VdfNode) pathContext.getValue("//children[name='apps']");
95+
pathContext.setFunctions(new ClassFunctions(XPathFunctions.class, "xxx"));
96+
appsNode=(VdfNode) pathContext.getValue("//children[xxx:equalsIgnoreCase(name, 'apps')]");
9597
return appsNode;
9698
} catch (IOException|RecognitionException ex) {
9799
System.err.println(ex);
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* To change this license header, choose License Headers in Project Properties.
3+
* To change this template file, choose Tools | Templates
4+
* and open the template in the editor.
5+
*/
6+
package com.ignorelist.kassandra.steam.scraper;
7+
8+
/**
9+
*
10+
* @author poison
11+
*/
12+
public class XPathFunctions {
13+
14+
public static boolean equalsIgnoreCase(String a, String b) {
15+
return null!=a&&null!=b&&a.equalsIgnoreCase(b);
16+
}
17+
}

0 commit comments

Comments
 (0)