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

Fix two issues found by static analysis #1143

Merged
merged 1 commit into from
Dec 27, 2014

Conversation

HairyFotr
Copy link
Contributor

I ran the Linter static analyzer on scalding and these two issues are IMO worthy of fixing:

[warn] scalding/scalding-core/src/main/scala/com/twitter/scalding/TuplePacker.scala:72: Unless there are side-effects, .filter(...).headOption can be replaced by .find(...).
[warn]     val missing = Dsl.asList(fields).filter { f => !getSetters.contains(f.toString) }.headOption
[warn]                                                                                       ^

[warn] scalding/scalding-core/src/main/scala/com/twitter/scalding/Source.scala:108: This string format will throw: java.util.UnknownFormatConversionException: Conversion = '%'
[warn]     assert(!sources.containsKey(srcName), "Source %s had collision in uuid: %".format(this, uuid))
[warn]                                           ^

@johnynek
Copy link
Collaborator

Thanks!

johnynek added a commit that referenced this pull request Dec 27, 2014
Fix two issues found by static analysis
@johnynek johnynek merged commit 22813ef into twitter:develop Dec 27, 2014
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