From 733cce090046a034267fb4558182466cd92f6954 Mon Sep 17 00:00:00 2001 From: Mira Leung Date: Thu, 29 Oct 2020 13:50:49 -0700 Subject: [PATCH] fix: prevent descension into map types in nested message parsing --- .../java/com/google/api/generator/gapic/protoparser/Parser.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java b/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java index 2b58e07f51e..c16246a70e9 100644 --- a/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java +++ b/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java @@ -240,6 +240,8 @@ private static Map parseMessages( } } String pakkage = TypeParser.getPackage(messageDescriptor.getFile()); + List fieldNames = + messageDescriptor.getFields().stream().map(f -> f.getName()).collect(Collectors.toList()); messages.put( messageName, Message.builder()