Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed GetMessage Helper Method #736

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

None yet

2 participants