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

Use Long to represent Content-Length #357

Merged
merged 5 commits into from
Dec 17, 2018

Conversation

mikkokar
Copy link
Contributor

@mikkokar mikkokar commented Dec 7, 2018

No description provided.

@@ -728,10 +728,10 @@ private void ensureContentLengthIsValid() {
return headerValues.isEmpty() ? Optional.empty() : Optional.of(headerValues.get(0));
}

private static boolean isInteger(String contentLength) {
private static boolean isPositiveInteger(String contentLength) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
private static boolean isPositiveInteger(String contentLength) {
private static boolean isNonNegativeInteger(String contentLength) {

Generally the term "positive integer" refers to an integer greater than zero. I'm not sure if there is an official ruling for numbers in Java, but this is the use of the term I am familiar with.

@mikkokar mikkokar merged commit a9f4509 into ExpediaGroup:master Dec 17, 2018
@mikkokar mikkokar deleted the long-content-length branch December 17, 2018 09:06
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