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

[MINOR][BUILD] Fix build warnings and Java lint errors #19051

Closed
wants to merge 1 commit into from

Conversation

srowen
Copy link
Member

@srowen srowen commented Aug 25, 2017

What changes were proposed in this pull request?

Fix build warnings and Java lint errors. This just helps a bit in evaluating (new) warnings in another PR I have open.

How was this patch tested?

Existing tests

@@ -31,7 +32,7 @@
* </p>
*/
@Private
public interface KVStoreIterator<T> extends Iterator<T>, AutoCloseable {
public interface KVStoreIterator<T> extends Iterator<T>, Closeable {
Copy link
Member Author

Choose a reason for hiding this comment

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

Weird one, but it warns on extending AutoCloseable without explicitly narrowing the exceptions that close() throws to not include InterruptedException.

@@ -187,14 +187,13 @@ class CrossValidatorSuite
cv2.getEstimator match {
case ova2: OneVsRest =>
assert(ova.uid === ova2.uid)
val classifier = ova2.getClassifier
classifier match {
ova2.getClassifier match {
Copy link
Member Author

Choose a reason for hiding this comment

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

Another weird one where the construct is equivalent but ended up causing scalac to construe this as an existential type

@@ -2058,7 +2058,7 @@
<javacArg>${java.version}</javacArg>
<javacArg>-target</javacArg>
<javacArg>${java.version}</javacArg>
<javacArg>-Xlint:all,-serial,-path</javacArg>
<javacArg>-Xlint:all,-serial,-path,-try</javacArg>
Copy link
Member Author

Choose a reason for hiding this comment

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

Avoids many harmless warnings about not referencing the variable define in try-with-resources

@SparkQA
Copy link

SparkQA commented Aug 25, 2017

Test build #81120 has finished for PR 19051 at commit 29fd7d7.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Aug 25, 2017

Test build #3901 has finished for PR 19051 at commit 29fd7d7.

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

@SparkQA
Copy link

SparkQA commented Aug 25, 2017

Test build #3902 has finished for PR 19051 at commit 29fd7d7.

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

@srowen
Copy link
Member Author

srowen commented Aug 25, 2017

Merged to master

@srowen srowen closed this Aug 25, 2017
@srowen srowen deleted the JavaWarnings branch August 25, 2017 15:07
asfgit pushed a commit that referenced this pull request Aug 25, 2017
## What changes were proposed in this pull request?

Fix build warnings and Java lint errors. This just helps a bit in evaluating (new) warnings in another PR I have open.

## How was this patch tested?

Existing tests

Author: Sean Owen <sowen@cloudera.com>

Closes #19051 from srowen/JavaWarnings.
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