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

[SPARK-13423] [HOTFIX] Static analysis fixes for 2.x / fixed for Scala 2.10 #11493

Closed
wants to merge 1 commit into from

Conversation

srowen
Copy link
Member

@srowen srowen commented Mar 3, 2016

What changes were proposed in this pull request?

Fixes compile problem due to inadvertent use of Option.contains, only in Scala 2.11. The change should have been to replace Option.exists(_ == x) with == Some(x). Replacing exists with contains only makes sense for collections. Replacing use of Option.exists still makes sense though as it's misleading.

How was this patch tested?

Jenkins tests / compilation

(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)

@SparkQA
Copy link

SparkQA commented Mar 3, 2016

Test build #52393 has finished for PR 11493 at commit 217dde3.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@srowen
Copy link
Member Author

srowen commented Mar 3, 2016

Jenkins, retest this please

@SparkQA
Copy link

SparkQA commented Mar 3, 2016

Test build #52395 has finished for PR 11493 at commit 217dde3.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@srowen
Copy link
Member Author

srowen commented Mar 3, 2016

Merged to master

@asfgit asfgit closed this in 645c3a8 Mar 3, 2016
@srowen srowen deleted the SPARK-13423.2 branch March 3, 2016 15:13
roygao94 pushed a commit to roygao94/spark that referenced this pull request Mar 22, 2016
… 2.10

## What changes were proposed in this pull request?

Fixes compile problem due to inadvertent use of `Option.contains`, only in Scala 2.11. The change should have been to replace `Option.exists(_ == x)` with `== Some(x)`. Replacing exists with contains only makes sense for collections. Replacing use of `Option.exists` still makes sense though as it's misleading.

## How was this patch tested?

Jenkins tests / compilation

(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)

Author: Sean Owen <[email protected]>

Closes apache#11493 from srowen/SPARK-13423.2.
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.

2 participants