Skip to content

Conversation

@KirillTurchinskii
Copy link
Contributor

What is this PR for?

Position literals first in comparisons, if the second argument is null then NullPointerExceptions can be avoided, they will just return false.
Then I will move to annotations and other issues that my static analyzer shows
(My previous branch was removed because of the multiple problems, so I decided to start over)

What type of PR is it?

Refactoring

What is the Jira issue?

This task is not on jira, but I'll move to this
https://issues.apache.org/jira/browse/ZEPPELIN-3225?filter=12348928

How should this be tested?

https://travis-ci.org/github/KirillTurchinskii/zeppelin/builds/682716706

Screenshots (if appropriate)

Questions:

  • What else besides annotations (that I will add) I can fix/refactor using static analysis?

…l then NullPointerExceptions can be avoided, they will just return false.
@Reamer
Copy link
Contributor

Reamer commented May 4, 2020

LGTM

1 similar comment
@Leemoonsoo
Copy link
Member

LGTM

@asfgit asfgit closed this in 302c287 May 6, 2020
asfgit pushed a commit that referenced this pull request May 6, 2020
### What is this PR for?
Position literals first in comparisons, if the second argument is null then NullPointerExceptions can be avoided, they will just return false.
Then I will move to annotations and other issues that my static analyzer shows
(My previous branch was removed because of the multiple problems, so I decided to start over)

### What type of PR is it?
Refactoring

### What is the Jira issue?
This task is not on jira, but I'll move to this
https://issues.apache.org/jira/browse/ZEPPELIN-3225?filter=12348928

### How should this be tested?
https://travis-ci.org/github/KirillTurchinskii/zeppelin/builds/682716706

### Screenshots (if appropriate)

### Questions:
* What else besides annotations (that I will add) I can fix/refactor using static analysis?

Author: Kirill Turchinskii <[email protected]>

Closes #3760 from KirillTurchinskii/fix2 and squashes the following commits:

6b4ce16 [Kirill Turchinskii] Position literals first in comparisons, if the second argument is null then NullPointerExceptions can be avoided, they will just return false.

(cherry picked from commit 302c287)
Signed-off-by: Alex Ott <[email protected]>
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.

4 participants