Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package datadog.trace.bootstrap.instrumentation.jdbc;

import java.util.Objects;
import datadog.trace.util.HashingUtils;

public final class DBInfo {
public static final DBInfo DEFAULT = new Builder().type("database").build();
Expand Down Expand Up @@ -256,7 +257,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(
return HashingUtils.hash(
type,
subtype,
fullPropagationSupport,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package datadog.trace.agent.tooling.bytebuddy.matcher;

import java.security.ProtectionDomain;
import java.util.Objects;
import net.bytebuddy.agent.builder.AgentBuilder;
import net.bytebuddy.description.type.TypeDescription;
import net.bytebuddy.matcher.ElementMatcher;
import net.bytebuddy.utility.JavaModule;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import datadog.trace.util.HashingUtils;

/** {@link AgentBuilder.RawMatcher} that logs and swallows exceptions while matching. */
public class FailSafeRawMatcher implements AgentBuilder.RawMatcher {
Expand Down Expand Up @@ -73,6 +73,6 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(typeMatcher, classLoaderMatcher);
return HashingUtils.hash(typeMatcher, classLoaderMatcher);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import datadog.trace.util.Strings;
import java.util.Objects;
import javax.annotation.Nonnull;
import datadog.trace.util.HashingUtils;

public class PullRequestInfo {

Expand Down Expand Up @@ -101,7 +102,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(baseBranch, baseBranchSha, headCommit, pullRequestNumber);
return HashingUtils.hash(baseBranch, baseBranchSha, headCommit, pullRequestNumber);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.util.Map;
import java.util.Objects;
import javax.annotation.Nullable;
import datadog.trace.util.HashingUtils;

public class CiVisibilitySettings {

Expand Down Expand Up @@ -137,7 +138,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(
return HashingUtils.hash(
itrEnabled,
codeCoverage,
testsSkipping,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
import datadog.trace.util.HashingUtils;

public class EarlyFlakeDetectionSettings {

Expand Down Expand Up @@ -56,7 +57,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(enabled, executionsByDuration, faultySessionThreshold);
return HashingUtils.hash(enabled, executionsByDuration, faultySessionThreshold);
}

public static final class Serializer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import java.util.Objects;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import datadog.trace.util.HashingUtils;

/** Settings and tests data received from the backend. */
public class ExecutionSettings {
Expand Down Expand Up @@ -277,7 +278,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(
return HashingUtils.hash(
itrEnabled,
codeCoverageEnabled,
testSkippingEnabled,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package datadog.trace.civisibility.config;

import java.nio.ByteBuffer;
import java.util.Objects;
import datadog.trace.util.HashingUtils;

public final class ExecutionsByDuration {
public final long durationMillis;
Expand Down Expand Up @@ -34,7 +34,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(durationMillis, executions);
return HashingUtils.hash(durationMillis, executions);
}

public static class Serializer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import datadog.trace.civisibility.ipc.serialization.Serializer;
import java.nio.ByteBuffer;
import java.util.Objects;
import datadog.trace.util.HashingUtils;

public class JvmInfo {

Expand Down Expand Up @@ -58,7 +59,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(name, version, vendor);
return HashingUtils.hash(name, version, vendor);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import datadog.trace.util.HashingUtils;

public class TestManagementSettings {

Expand Down Expand Up @@ -46,7 +46,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(enabled, attemptToFixRetries);
return HashingUtils.hash(enabled, attemptToFixRetries);
}

public static final class Serializer {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package datadog.trace.civisibility.events;

import java.util.Objects;
import datadog.trace.util.HashingUtils;

public class BuildTaskDescriptor<T> {

Expand All @@ -26,6 +26,6 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(sessionKey, taskName);
return HashingUtils.hash(sessionKey, taskName);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import javax.annotation.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import datadog.trace.util.HashingUtils;

public class ShellGitClient implements GitClient {

Expand Down Expand Up @@ -838,7 +839,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(branch, behind, ahead);
return HashingUtils.hash(branch, behind, ahead);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import datadog.trace.civisibility.ipc.serialization.Serializer;
import java.nio.ByteBuffer;
import java.util.Objects;
import datadog.trace.util.HashingUtils;

public class ExecutionSettingsRequest implements Signal {

Expand Down Expand Up @@ -47,7 +48,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(moduleName, jvmInfo);
return HashingUtils.hash(moduleName, jvmInfo);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import datadog.trace.civisibility.config.ExecutionSettings;
import java.nio.ByteBuffer;
import java.util.Objects;
import datadog.trace.util.HashingUtils;

public class ExecutionSettingsResponse implements SignalResponse {

Expand Down Expand Up @@ -40,7 +41,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(settings);
return HashingUtils.hash(settings);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import datadog.trace.civisibility.ipc.serialization.Serializer;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Objects;
import javax.annotation.Nonnull;
import datadog.trace.util.HashingUtils;

public class ModuleCoverageDataJacoco extends ModuleSignal {

Expand Down Expand Up @@ -39,7 +39,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(sessionId, moduleId, Arrays.hashCode(coverageData));
return HashingUtils.hash(sessionId, moduleId, Arrays.hashCode(coverageData));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.nio.ByteBuffer;
import java.util.Collection;
import java.util.Objects;
import datadog.trace.util.HashingUtils;

public class ModuleExecutionResult extends ModuleSignal {

Expand Down Expand Up @@ -99,7 +100,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(
return HashingUtils.hash(
sessionId,
moduleId,
coverageEnabled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import datadog.trace.civisibility.ipc.serialization.Serializer;
import java.nio.ByteBuffer;
import java.util.Objects;
import datadog.trace.util.HashingUtils;

public final class TestFramework implements Comparable<TestFramework> {
private final String name;
Expand Down Expand Up @@ -35,7 +36,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(name, version);
return HashingUtils.hash(name, version);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package datadog.trace.civisibility.source;

import java.lang.reflect.Method;
import java.util.Objects;
import javax.annotation.Nonnull;
import datadog.trace.util.HashingUtils;

public interface LinesResolver {

Expand Down Expand Up @@ -49,7 +49,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(startLineNumber, endLineNumber);
return HashingUtils.hash(startLineNumber, endLineNumber);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import javax.annotation.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import datadog.trace.util.HashingUtils;

public class RepoIndex {

Expand Down Expand Up @@ -194,7 +195,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(relativePath, language);
return HashingUtils.hash(relativePath, language);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import datadog.trace.util.RandomUtils;
import java.io.IOException;
import java.util.Objects;
import datadog.trace.util.HashingUtils;

public final class CrashLog {
private static final int VERSION = 0;
Expand Down Expand Up @@ -90,7 +91,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(
return HashingUtils.hash(
uuid,
timestamp,
incomplete,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.squareup.moshi.Json;
import java.util.Objects;
import datadog.trace.util.HashingUtils;

public final class ErrorData {
@Json(name = "is_crash")
Expand Down Expand Up @@ -39,6 +40,6 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(isCrash, kind, message, sourceType, stack);
return HashingUtils.hash(isCrash, kind, message, sourceType, stack);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.squareup.moshi.Json;
import java.util.Arrays;
import java.util.Objects;
import datadog.trace.util.HashingUtils;

public final class Metadata {
@Json(name = "library_name")
Expand Down Expand Up @@ -38,6 +39,6 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(libraryName, libraryVersion, family, Arrays.hashCode(tags));
return HashingUtils.hash(libraryName, libraryVersion, family, Arrays.hashCode(tags));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.squareup.moshi.Json;
import datadog.environment.SystemProperties;
import java.util.Objects;
import datadog.trace.util.HashingUtils;

public final class OSInfo {
public final String architecture;
Expand Down Expand Up @@ -37,7 +38,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(architecture, bitness, osType, version);
return HashingUtils.hash(architecture, bitness, osType, version);
}

public static OSInfo current() {
Expand Down
Loading
Loading