Skip to content

Conversation

patilakshay227
Copy link

Issue

Consider following proto file content

message Bike {
  MetaInfo meta_info = 1;
  message MetaInfo {
    string manufacturer = 1;
  }
}

message Car {
    MetaInfo meta_info = 1;
    message MetaInfo {
      string manufacturer = 1;
      int32 seating_capactiy = 2;
    }
}

If GetMessage helper method is called with argument Car.MetaInfo.

In the existing version, it will iterate over the top-level message Bike first, remove the Bike. prefix, and try to find MetaInfo in Nested Messages of Bike which it would be able to find but it is incorrect as caller asked for Car.MetaInfo not Bike.MetaInfo.

Fix

Added a check to search for nested message only if prefix match with provided typeName.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants