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

REFACTOR: Rename parameter to reflect expectation #1601

Merged
merged 1 commit into from
Sep 28, 2016
Merged

REFACTOR: Rename parameter to reflect expectation #1601

merged 1 commit into from
Sep 28, 2016

Conversation

tonyjzhou
Copy link
Contributor

A simple first time improvement for code readability.

Problem

It's very easy to confuse the first parameter of this method as path instead of a glob pattern, which is what it really asks for:
protected def pathIsGood(p: String, conf: Configuration) = FileSource.globHasNonHiddenPaths(p, conf)

Solution

Rename the first parameter from p to globPattern.

This only result in more readable code.
No behavior change is expected.

@johnynek
Copy link
Collaborator

👍

@isnotinvain
Copy link
Contributor

@johnynek just realized, since scala lets you call methods with named params, does this count as an incompatible change?

@johnynek
Copy link
Collaborator

@isnotinvain I don't care too much. I care about binary incompatible. Source incompatible that very few users hit are not a big deal in my book.

@isnotinvain
Copy link
Contributor

OK, does it wind up being binary compatible? the compiler must ultimately just call the params in order to work w/ the jvm I guess so it probably is binary compatible.

👍

@isnotinvain isnotinvain merged commit 9b95d3e into twitter:develop Sep 28, 2016
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