From 23ff60b24164a1dfaf2f9c52b5529a087ec65ba3 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Wed, 23 Sep 2020 17:12:35 +0200 Subject: [PATCH] Hotfix java 11 exception --- SpigotCore_Main/src/de/steamwar/sql/DownloadSchematic.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SpigotCore_Main/src/de/steamwar/sql/DownloadSchematic.java b/SpigotCore_Main/src/de/steamwar/sql/DownloadSchematic.java index 167e5ce..567aad6 100644 --- a/SpigotCore_Main/src/de/steamwar/sql/DownloadSchematic.java +++ b/SpigotCore_Main/src/de/steamwar/sql/DownloadSchematic.java @@ -19,7 +19,8 @@ package de.steamwar.sql; -import javax.xml.bind.DatatypeConverter; +import com.google.common.io.BaseEncoding; + import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.sql.ResultSet; @@ -48,7 +49,7 @@ public class DownloadSchematic { } cript.reset(); cript.update((Instant.now().toString() + schem.getSchemOwner() + schem.getSchemID()).getBytes()); - String hash = DatatypeConverter.printHexBinary(cript.digest()); + String hash = BaseEncoding.base16().encode(cript.digest()); SQL.update("INSERT INTO SchemDownload (SchemID, Link) VALUES (?, ?)", schem.getSchemID(), hash); return BASE + hash; }