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

Handle a field named "result", "other", or "o" #40

Merged
merged 1 commit into from
Oct 1, 2013

Conversation

danrice67
Copy link
Collaborator

Fixes #38.

@@ -1463,6 +1463,9 @@ private void emitMessageHashCode(MessageType messageType) throws IOException {
} else if (hasOnlyOneField(messageType)) {
Field field = messageType.getFields().get(0);
String name = sanitize(field.getName());
if ("result".equals(name)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One-line me?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One liners are for return statements only (and even then I hate them)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a comment explaining why qualification is needed.

@pforhan
Copy link
Contributor

pforhan commented Sep 30, 2013

LGTM.

@danrice67
Copy link
Collaborator Author

I'll add a comment and also fix the issue with equals() before merging.

danrice67 pushed a commit that referenced this pull request Oct 1, 2013
Handle a field named "result", "other", or "o"
@danrice67 danrice67 merged commit 2371503 into master Oct 1, 2013
@danrice67 danrice67 deleted the rice/result_field branch October 1, 2013 03:35
@JakeWharton
Copy link
Member

👍

mattprecious pushed a commit that referenced this pull request Apr 15, 2014
Fix IllegalStateException when trying to add a header or footer to the CalendarPickerView on Samsung Galaxy Nexus running Android 4.2.2
swankjesse added a commit that referenced this pull request Jul 13, 2015
Properly handle nested types when converting to map.
JakeWharton pushed a commit that referenced this pull request Jun 23, 2020
* commit '860c3a191d9cf30b907ceb02d4f4bb5364348ed7':
  Add support for encoding Int to Int maps
  Reorganize methods
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.

Field shadowed by local variable
3 participants