summaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorgjoranv <gv@verizonmedia.com>2022-05-12 15:25:47 +0200
committergjoranv <gv@verizonmedia.com>2022-06-08 11:45:21 +0200
commit5da809318217b36a990ec030145a547e9eebaef8 (patch)
treed73a72a18b18bb007b93738133e44ff3e75ba5f5 /controller-server
parent84e869333e0ab433d3fcfc91c2f0124991f1e586 (diff)
Upgrade to guice 4.2.3 and guava 27.1
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/RoutingController.java1
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/pkg/ApplicationPackage.java3
2 files changed, 4 insertions, 0 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/RoutingController.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/RoutingController.java
index c0829adc7ae..5ff15307ac3 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/RoutingController.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/RoutingController.java
@@ -413,6 +413,7 @@ public class RoutingController {
/** Create a common name based on a hash of given application. This must be less than 64 characters long. */
private static String commonNameHashOf(ApplicationId application, SystemName system) {
+ @SuppressWarnings("deprecation") // for Hashing.sha1()
HashCode sha1 = Hashing.sha1().hashString(application.serializedForm(), StandardCharsets.UTF_8);
String base32 = BaseEncoding.base32().omitPadding().lowerCase().encode(sha1.asBytes());
return 'v' + base32 + Endpoint.internalDnsSuffix(system);
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/pkg/ApplicationPackage.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/pkg/ApplicationPackage.java
index 7b3b90d1458..91f141f880b 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/pkg/ApplicationPackage.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/pkg/ApplicationPackage.java
@@ -98,6 +98,7 @@ public class ApplicationPackage {
* it must not be further changed by the caller.
* If 'requireFiles' is true, files needed by deployment orchestration must be present.
*/
+ @SuppressWarnings("deprecation") // for Hashing.sha1()
public ApplicationPackage(byte[] zippedContent, boolean requireFiles) {
this.zippedContent = Objects.requireNonNull(zippedContent, "The application package content cannot be null");
this.contentHash = Hashing.sha1().hashBytes(zippedContent).toString();
@@ -240,6 +241,7 @@ public class ApplicationPackage {
}
// Hashes all files and settings that require a deployment to be forwarded to configservers
+ @SuppressWarnings("deprecation") // for Hashing.sha1()
private String calculateBundleHash(byte[] zippedContent) {
Predicate<String> entryMatcher = name -> ! name.endsWith(deploymentFile) && ! name.endsWith(buildMetaFile);
SortedMap<String, Long> crcByEntry = new TreeMap<>();
@@ -261,6 +263,7 @@ public class ApplicationPackage {
.hash().toString();
}
+ @SuppressWarnings("deprecation") // for Hashing.sha1()
public static String calculateHash(byte[] bytes) {
return Hashing.sha1().newHasher()
.putBytes(bytes)