From 294e283c43ba5f7f56a5247e14390de22ac6859f Mon Sep 17 00:00:00 2001 From: Peter Thomas Date: Mon, 5 Feb 2024 22:30:17 +0530 Subject: [PATCH] remove dead code --- .../src/main/java/com/intuit/karate/FileUtils.java | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/karate-core/src/main/java/com/intuit/karate/FileUtils.java b/karate-core/src/main/java/com/intuit/karate/FileUtils.java index a644bd9c0..2412d2304 100755 --- a/karate-core/src/main/java/com/intuit/karate/FileUtils.java +++ b/karate-core/src/main/java/com/intuit/karate/FileUtils.java @@ -39,8 +39,6 @@ import java.util.Comparator; import java.util.Properties; import java.util.UUID; -import java.util.zip.CRC32; -import java.util.zip.Checksum; import org.slf4j.LoggerFactory; /** @@ -59,7 +57,6 @@ private FileUtils() { public static final String KARATE_VERSION; public static final String KARATE_META; public static final String USER_UUID; - public static final String USER_HASH; static { Properties props = new Properties(); @@ -78,7 +75,6 @@ private FileUtils() { KARATE_TELEMETRY = telemetryEnv == null ? true : telemetryEnv.trim().equals("true"); String userHome = System.getProperty("user.home", ""); String uuid; - String hash; try { File uuidFile = new File(userHome + File.separator + ".karate" + File.separator + "uuid.txt"); if (uuidFile.exists()) { @@ -87,24 +83,14 @@ private FileUtils() { uuid = UUID.randomUUID().toString(); writeToFile(uuidFile, uuid); } - hash = checksum(userHome) + ""; } catch (Exception e) { - hash = "unknown"; uuid = "unknown"; } - USER_HASH = hash; USER_UUID = uuid; } public static final File WORKING_DIR = new File("").getAbsoluteFile(); - public static long checksum(String src) { - byte[] bytes = src.getBytes(UTF_8); - Checksum crc32 = new CRC32(); - crc32.update(bytes, 0, bytes.length); - return crc32.getValue(); - } - public static StringUtils.Pair parsePathAndTags(String text) { int pos = text.indexOf('@'); if (pos == -1) {