Skip to content

Commit

Permalink
disable shadow list handler as the API endpoint does not seem to work
Browse files Browse the repository at this point in the history
  • Loading branch information
FriedrichFroebel committed May 13, 2020
1 parent 1f05b40 commit 20c394a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.gradle
build
*.gpx

# Ignore Gradle GUI config
gradle-app.setting
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ repositories {
dependencies {
implementation group: 'commons-codec', name: 'commons-codec', version: '1.14'
implementation group: 'org.apache.commons', name: 'commons-text', version: '1.8'
implementation group: 'joda-time', name: 'joda-time', version: '2.10.5'
implementation group: 'joda-time', name: 'joda-time', version: '2.10.6'
implementation group: 'com.github.scribejava', name: 'scribejava-core', version: '4.1.0'
implementation group: 'org.openstreetmap.jmapviewer', name: 'jmapviewer', version: '2.13'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.6'
Expand All @@ -44,7 +44,7 @@ project.ext.ocOkapiPropertiesFile = projectDir.getPath() + "${File.separator}oc_
sourceCompatibility = 1.8
targetCompatibility = 1.8

version = '0.2.45'
version = '0.2.46'

wrapper {
gradleVersion = '6.3'
Expand Down
1 change: 0 additions & 1 deletion src/main/java/cmanager/FileHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ private static void processZipFile(String path, FileHelper.InputAction ia) throw

private static void processZipFile(InputStream is, FileHelper.InputAction ia) throws Throwable
{

// get the zip file content
ZipInputStream zis = new ZipInputStream(is);
// get the zipped file list entry
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/cmanager/oc/ShadowList.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ public static void updateShadowList() throws IOException
public static ShadowList loadShadowList() throws Throwable
{
final HashMap<String, String> shadowList = new HashMap<>();
FileHelper.processFiles(SHADOWLIST_PATH, new InputAction() {

System.out.println("Shadow list retrieval disabled as the API endpoint seems to be broken for now.");
// TODO: Enable after the GZip archive is valid again.
/*FileHelper.processFiles(SHADOWLIST_PATH, new InputAction() {
@Override
public void process(InputStream is) throws Throwable
{
Expand All @@ -72,7 +75,8 @@ public void process(InputStream is) throws Throwable
}
}
}
});
});*/

return new ShadowList(shadowList);
}

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/cmanager/oc/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ public Void call()
ArrayList<Geocache> similar =
OKAPI.getCachesAround(user, uuid, gc, searchRadius, okapiRuntimeCache);
boolean match = false;
for (Geocache oc : similar)
if (GeocacheComparator.similar(oc, gc))
{
for (Geocache oc : similar) {
if (GeocacheComparator.similar(oc, gc)) {
OKAPI.completeCacheDetails(oc);
oi.match(gc, oc);
match = true;
}
}

if (!match)
SearchCache.setEmptySearch(gc, uuid);
Expand Down

0 comments on commit 20c394a

Please sign in to comment.