Skip to content

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrthomas committed Feb 5, 2024
1 parent 8c57a0d commit 294e283
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions karate-core/src/main/java/com/intuit/karate/FileUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand All @@ -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();
Expand All @@ -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()) {
Expand All @@ -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) {
Expand Down

0 comments on commit 294e283

Please sign in to comment.