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

removal of unnecssary parsing if httpMethod is null #2218

Conversation

guptasourabh
Copy link

If httpMethod is null then we don't need to parse and set the other values

@@ -282,6 +282,8 @@ private void parseHttpMethodAndPath(String httpMethod, String value, boolean has
throw methodError("Only one HTTP method is allowed. Found: %s and %s.",
this.httpMethod, httpMethod);
}
if (null == httpMethod) return;
Copy link
Member

Choose a reason for hiding this comment

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

This will never be true.

Copy link
Author

@guptasourabh guptasourabh Feb 25, 2017

Choose a reason for hiding this comment

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

if we go through the code in the ServiceMethod build after parseMethodAnnotations , we are checking if httpMethod is null or not and then throwing the exception , so if we check at parseHttpMethodPath itself , we don't need to do value parsing for updating relativeUrl

@JakeWharton
Copy link
Member

JakeWharton commented Feb 25, 2017 via email

@guptasourabh
Copy link
Author

@JakeWharton requested changes done

@guptasourabh guptasourabh deleted the removal_of_unnecessary_httpMethod_parsing branch February 25, 2017 05:55
@guptasourabh
Copy link
Author

Moved it into new PR #2219

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.

3 participants