From 415dff083fef1e7de50834a4a4482b97175a38ef Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 23 Nov 2015 19:52:01 -0500 Subject: [PATCH] Watcher and Shield should depend on same guava version. This causes hellaciousness at least with eclipse, possibly qa tests too. the sanitiser just wants 11+, so make it the same version as shield's (dragged in by jimfs). Also remove unnecessary usage of guava in a test Original commit: elastic/x-pack-elasticsearch@ea9ac88fdc428afb2ea181026c7abaa8b74f28f2 --- watcher/build.gradle | 2 +- .../watcher/transform/search/SearchTransformTests.java | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/watcher/build.gradle b/watcher/build.gradle index 06b53faea89..ef997debfa9 100644 --- a/watcher/build.gradle +++ b/watcher/build.gradle @@ -22,7 +22,7 @@ dependencies { provided project(path: ':x-plugins:shield', configuration: 'runtime') compile 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:r239' - compile 'com.google.guava:guava:19.0-rc2' + compile 'com.google.guava:guava:16.0.1' compile 'com.google.code.findbugs:jsr305:3.0.1' compile 'com.sun.mail:javax.mail:1.5.3' compile 'javax.activation:activation:1.1.1' diff --git a/watcher/src/test/java/org/elasticsearch/watcher/transform/search/SearchTransformTests.java b/watcher/src/test/java/org/elasticsearch/watcher/transform/search/SearchTransformTests.java index 5142007fcfe..0f66815ba2e 100644 --- a/watcher/src/test/java/org/elasticsearch/watcher/transform/search/SearchTransformTests.java +++ b/watcher/src/test/java/org/elasticsearch/watcher/transform/search/SearchTransformTests.java @@ -5,8 +5,6 @@ */ package org.elasticsearch.watcher.transform.search; -import com.google.common.base.Charsets; - import org.elasticsearch.action.indexedscripts.put.PutIndexedScriptRequest; import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.action.search.SearchResponse; @@ -53,6 +51,7 @@ import org.joda.time.chrono.ISOChronology; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; @@ -199,7 +198,7 @@ public class SearchTransformTests extends ESIntegTestCase { assertThat(map.get("query"), instanceOf(String.class)); String queryAsBase64 = (String) map.get("query"); - String decodedQuery = new String(Base64.decode(queryAsBase64), Charsets.UTF_8); + String decodedQuery = new String(Base64.decode(queryAsBase64), StandardCharsets.UTF_8); assertThat(decodedQuery, containsString("_unknown_query_")); }