Skip to content

Commit 7cd9595

Browse files
committed
Fixup #12492: Address gemini assist comments about runtime exception leak
1 parent d59c705 commit 7cd9595

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,14 +218,14 @@ private static Optional<ConfiguredChannelCredentials> channelCredsFromProto(Any
218218
XdsChannelCredentials.create(fallbackCreds.get().channelCredentials()),
219219
new ProtoChannelCredsConfig(typeUrl, cred)));
220220
case LOCAL_CREDENTIALS_TYPE_URL:
221-
throw new UnsupportedOperationException(
221+
throw new GrpcServiceParseException(
222222
"LocalCredentials are not supported in grpc-java. "
223223
+ "See https://github.com/grpc/grpc-java/issues/8928");
224224
case TLS_CREDENTIALS_TYPE_URL:
225225
// For this PR, we establish this structural skeleton,
226-
// but throw an UnsupportedOperationException until the exact stream conversions are
226+
// but throw an GrpcServiceParseException until the exact stream conversions are
227227
// merged.
228-
throw new UnsupportedOperationException(
228+
throw new GrpcServiceParseException(
229229
"TlsCredentials input stream construction pending.");
230230
default:
231231
return Optional.empty();

xds/src/test/java/io/grpc/xds/GrpcServiceConfigParserTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ public void parse_localCredentials() throws GrpcServiceParseException {
241241
.addChannelCredentialsPlugin(localCreds).addCallCredentialsPlugin(accessTokenCreds).build();
242242
GrpcService grpcService = GrpcService.newBuilder().setGoogleGrpc(googleGrpc).build();
243243

244-
UnsupportedOperationException exception = assertThrows(UnsupportedOperationException.class,
244+
GrpcServiceParseException exception = assertThrows(GrpcServiceParseException.class,
245245
() -> parse(grpcService,
246246
dummyBootstrapInfo(),
247247
dummyServerInfo()));
@@ -285,7 +285,7 @@ public void parse_tlsCredentials_notSupported() {
285285
.addChannelCredentialsPlugin(tlsCreds).addCallCredentialsPlugin(accessTokenCreds).build();
286286
GrpcService grpcService = GrpcService.newBuilder().setGoogleGrpc(googleGrpc).build();
287287

288-
UnsupportedOperationException exception = assertThrows(UnsupportedOperationException.class,
288+
GrpcServiceParseException exception = assertThrows(GrpcServiceParseException.class,
289289
() -> parse(grpcService,
290290
dummyBootstrapInfo(),
291291
dummyServerInfo()));

0 commit comments

Comments
 (0)