Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #459

Merged
merged 3 commits into from
May 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 11 additions & 27 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<dependency>
<groupId>com.beust</groupId>
<artifactId>jcommander</artifactId>
<version>1.32</version>
<version>1.78</version>
</dependency>
<dependency>
<groupId>org.openstreetmap.osmosis</groupId>
Expand All @@ -68,17 +68,18 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.3.2</version>
<version>3.10</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
<version>1.4.0</version>
<version>1.9.13</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.neovisionaries</groupId>
<artifactId>nv-i18n</artifactId>
<version>1.4</version>
<version>1.27</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
Expand Down Expand Up @@ -106,11 +107,6 @@
<artifactId>spark-core</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>postgis</groupId>
<artifactId>postgis-jdbc-jts</artifactId>
Expand All @@ -119,14 +115,14 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<version>4.13</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.24.0</version>
<version>2.25.0</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand All @@ -139,30 +135,18 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
</dependency>
<dependency>
<groupId>net.lingala.zip4j</groupId>
<artifactId>zip4j</artifactId>
<version>1.2.3</version>
<version>29.0-jre</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
<version>2.6</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20140107</version>
<version>20190722</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.2</version>
<scope>test</scope>
</dependency>

</dependencies>

<repositories>
Expand Down Expand Up @@ -315,7 +299,7 @@
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>

<elasticsearch.version>5.5.0</elasticsearch.version>
<slf4j.version>1.7.25</slf4j.version>
<slf4j.version>1.7.30</slf4j.version>
<log4j.version>2.8.2</log4j.version>

<additionalparam>-Xdoclint:none</additionalparam>
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/de/komoot/photon/elasticsearch/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.net.InetSocketAddress;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import java.util.Arrays;
Expand Down Expand Up @@ -184,14 +185,15 @@ public void recreateIndex() throws IOException {
.getResourceAsStream("mappings.json");
final InputStream index_settings = Thread.currentThread().getContextClassLoader()
.getResourceAsStream("index_settings.json");
final Charset utf8_charset = Charset.forName("utf-8");

String mappingsString = IOUtils.toString(mappings);
String mappingsString = IOUtils.toString(mappings, utf8_charset);
JSONObject mappingsJSON = new JSONObject(mappingsString);

// add all langs to the mapping
mappingsJSON = addLangsToMapping(mappingsJSON);

JSONObject settings = new JSONObject(IOUtils.toString(index_settings));
JSONObject settings = new JSONObject(IOUtils.toString(index_settings, utf8_charset));
if (shards != null) {
settings.put("index", new JSONObject("{ \"number_of_shards\":" + shards + " }"));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package de.komoot.photon.nominatim.model;

import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;
import lombok.Data;

import java.util.Arrays;
Expand Down Expand Up @@ -92,7 +92,7 @@ public boolean isState() {

@Override
public String toString() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("placeId", placeId)
.add("name", name)
.add("osmKey", osmKey)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;

public class TagFilterQueryBuilderTest {

Expand All @@ -21,7 +22,7 @@ public void testConstructor() throws IOException {
TagFilterQueryBuilder photonQueryBuilder = PhotonQueryBuilder.builder("berlin", "en");
InputStream resourceAsStream = this.getClass().getClassLoader()
.getResourceAsStream("json_queries/test_base_query.json");
String expectedJsonString = IOUtils.toString(resourceAsStream);
String expectedJsonString = IOUtils.toString(resourceAsStream, Charset.forName("utf-8"));

String actualJsonString = new QueryToJson().convert(photonQueryBuilder.buildQuery());
JsonNode actualJson = this.readJson(actualJsonString);
Expand All @@ -34,7 +35,7 @@ public void testFrenchConstructor() throws IOException {
TagFilterQueryBuilder photonQueryBuilder = PhotonQueryBuilder.builder("berlin", "fr");
InputStream resourceAsStream = this.getClass().getClassLoader()
.getResourceAsStream("json_queries/test_base_query_fr.json");
String expectedJsonString = IOUtils.toString(resourceAsStream);
String expectedJsonString = IOUtils.toString(resourceAsStream, Charset.forName("utf-8"));

String actualJsonString = new QueryToJson().convert(photonQueryBuilder.buildQuery());
JsonNode actualJson = this.readJson(actualJsonString);
Expand Down