Skip to content

[SPARK-14630][Build][Core][SQL][Streaming] Code style: public abstract methods should have explicit return types - #12389

Closed
lw-lin wants to merge 3 commits into
apache:masterfrom
lw-lin:public-abstract-methods
Closed

[SPARK-14630][Build][Core][SQL][Streaming] Code style: public abstract methods should have explicit return types#12389
lw-lin wants to merge 3 commits into
apache:masterfrom
lw-lin:public-abstract-methods

Conversation

@lw-lin

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Currently many public abstract methods (in abstract classes as well as traits) don't declare return types explicitly, such as in o.a.s.streaming.dstream.InputDStream:

defstart() // should be: def start(): Unitdefstop() // should be: def stop(): Unit

These methods exist in core, sql, streaming; this PR fixes them.

How was this patch tested?

N/A

Which piece of scala style rule led to the changes?

the rule was added separately in #12396

@srowen

Copy link
Copy Markdown
Member

LGTM. It's good practice to make method return types explicit, especially if they're to be implemented in other classes. This should not change any behavior since it just makes the implicit "Unit" return type explicit.

@SparkQA

Copy link
Copy Markdown

Test build #55809 has finished for PR 12389 at commit d3d83b0.

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

@rxin

rxin commented Apr 14, 2016

Copy link
Copy Markdown
Contributor

Merging in master. Thanks.

@lw-lin

Copy link
Copy Markdown
ContributorAuthor

@srowen@rxin thank you for the review & merging! :-)

@lw-lin
lw-lin deleted the public-abstract-methods branch April 15, 2016 02:39
Sign up for freeto 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.

4 participants

@lw-lin@srowen@SparkQA@rxin