Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

Commit c3ab878

Browse files
committed
fix
1 parent 7f83e59 commit c3ab878

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/dp/DirectAccessInvestigator.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import com.google.cloud.bigtable.data.v2.internal.csm.tracers.DirectPathCompatibleTracer;
2121
import java.util.logging.Level;
2222
import java.util.logging.Logger;
23+
import javax.annotation.Nullable;
2324

2425
@InternalApi
2526
public class DirectAccessInvestigator {
@@ -34,7 +35,7 @@ public enum FailureReason {
3435
LOOPBACK_V4_MISSING("loopback_misconfigured_ipv4"),
3536
LOOPBACK_V6_MISSING("loopback_misconfigured_ipv6"),
3637
USER_DISABLED("user_disabled"),
37-
UNKNOWN("");
38+
UNKNOWN("unknown");
3839

3940
private final String value;
4041

@@ -49,7 +50,7 @@ public String getValue() {
4950

5051
// This is only called when direct access check fails.
5152
public static void investigateAndReport(
52-
DirectPathCompatibleTracer tracer, Throwable originalError) {
53+
DirectPathCompatibleTracer tracer, @Nullable Throwable originalError) {
5354
try {
5455
// TODO: Implement checks in a future PR.
5556
// For now, default to returning "unknown".
@@ -65,7 +66,10 @@ public static void investigateAndReport(
6566

6667
/** Helper method to consistently log the failure reason and record it to the tracer. */
6768
private static void recordAndLog(
68-
DirectPathCompatibleTracer tracer, FailureReason reason, String logMessage, Throwable error) {
69+
DirectPathCompatibleTracer tracer,
70+
FailureReason reason,
71+
String logMessage,
72+
@Nullable Throwable error) {
6973
if (error != null) {
7074
LOG.log(Level.FINE, logMessage, error);
7175
} else {

0 commit comments

Comments
 (0)