mirror of https://github.com/grpc/grpc-java.git
xds: Replace null check with has value check because proto fields can never be null. (#11675)
This commit is contained in:
parent
d6c80294a7
commit
5081e60626
|
|
@ -72,8 +72,8 @@ final class GcpAuthenticationFilter implements Filter, ClientInterceptorBuilder
|
||||||
|
|
||||||
long cacheSize = 10;
|
long cacheSize = 10;
|
||||||
// Validate cache_config
|
// Validate cache_config
|
||||||
TokenCacheConfig cacheConfig = gcpAuthnProto.getCacheConfig();
|
if (gcpAuthnProto.hasCacheConfig()) {
|
||||||
if (cacheConfig != null) {
|
TokenCacheConfig cacheConfig = gcpAuthnProto.getCacheConfig();
|
||||||
cacheSize = cacheConfig.getCacheSize().getValue();
|
cacheSize = cacheConfig.getCacheSize().getValue();
|
||||||
if (cacheSize == 0) {
|
if (cacheSize == 0) {
|
||||||
return ConfigOrError.fromError(
|
return ConfigOrError.fromError(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue