Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ public class Parser {
private static final String COLON = ":";
private static final String DEFAULT_PORT = "443";
private static final String DOT = ".";

// Allow other parsers to access this.
protected static final SourceCodeInfoParser SOURCE_CODE_INFO_PARSER = new SourceCodeInfoParser();

Expand All @@ -83,7 +82,9 @@ public static GapicContext parse(CodeGeneratorRequest request) {
Optional<String> serviceYamlConfigPathOpt =
PluginArgumentParser.parseServiceYamlConfigPath(request);
Optional<com.google.api.Service> serviceYamlProtoOpt =
ServiceYamlParser.parse(serviceYamlConfigPathOpt.get());
serviceYamlConfigPathOpt.isPresent()
? ServiceYamlParser.parse(serviceYamlConfigPathOpt.get())
: Optional.empty();

// Keep message and resource name parsing separate for cleaner logic.
// While this takes an extra pass through the protobufs, the extra time is relatively trivial
Expand Down