Skip to content

Commit 9382cef

Browse files
authored
[ggj][parsing] fix: update messageTypes.get(simpleName) fix in HttpRuleParser (#548)
* fix: align resname ctors with superclass variants * fix: avoid type collisions - refactor {Concrete,Vapor}Ref into AstNodes * fix: better message null checks in Parser * fix: map proto.Empty RPC types to void in ServiceClient * fix: improve import(shortName) state-keeping in ImportWriterVisitor * fix: fix stub pkg for all ServiceSettingsStub usages * fix: handle older protos with javaMultipleFiles=false * fix: gate isPaged on all fields for monolith back-compat * fix: fail early if bazel lacks a grpc_service_config.json file * fix: add Bazel handling for lack of resname helper classes * fix: reverse conditional * fix: handle floating-point types for test codegen assertEquals * fix: handle older protos w/o java_mult_file and w/o java_outer_classname set * fix: fix bidiStreamCall to use one param in ServiceClientTest codegen * fix: update messageTypes.get(simpleName) fix in HttpRuleParser
1 parent 8223c33 commit 9382cef

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/com/google/api/generator/gapic/protoparser/HttpRuleParser.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ public static Optional<List<String>> parseHttpBindings(
6262
String subField = descendantBindings[i];
6363
if (i < descendantBindings.length - 1) {
6464
Field field = containingMessage.fieldMap().get(subField);
65-
containingMessage = messageTypes.get(field.type().reference().name());
65+
containingMessage = messageTypes.get(field.type().reference().simpleName());
66+
Preconditions.checkNotNull(
67+
containingMessage,
68+
String.format(
69+
"No containing message found for field %s with type %s",
70+
field.name(), field.type().reference().simpleName()));
6671
} else {
6772
checkHttpFieldIsValid(subField, containingMessage, false);
6873
}

0 commit comments

Comments
 (0)