Skip to content

Commit ecf8e55

Browse files
committed
1. xds: fixes possible NPE
1 parent 4a21f2b commit ecf8e55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xds/src/main/java/io/grpc/xds/XdsClientMetricReporterImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ static final class MetricReporterCallback implements ServerConnectionCallback {
230230
void reportResourceCountGauge(String authority, long resourceCount, String cacheState,
231231
String resourceType) {
232232
recorder.recordLongGauge(RESOURCES_GAUGE, resourceCount,
233-
Arrays.asList(target, authority.isEmpty() ? "#old" : authority,
233+
Arrays.asList(target, authority == null || authority.isEmpty() ? "#old" : authority,
234234
cacheState, resourceType), Collections.emptyList());
235235
}
236236

0 commit comments

Comments
 (0)