GitHub user benoyantony opened a pull request:
https://github.com/apache/zeppelin/pull/2310
ZEPPELIN-2484 do a Null check before calling trim on paragraph's text
### What is this PR for?
Prevent NullPointerException during check to determine whether a new
paragraph needs to added.
The fix is to switch order of null check and trim operation so that null
check is performed before trim()
### What type of PR is it?
Bug Fix
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-2484
### How should this be tested?
This can be tested with a hive interpreter
Create a note and add a paragraph with some query in it.
Run all paragraphs.
A new paragraph is automatically added.
Run all paragraphs again. A NullPointerException is logged in the logs.
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/benoyantony/zeppelin ZEPPELIN-2484
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zeppelin/pull/2310.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2310
----
commit 09e956e0ccc7d5522857fdece5d2232239085f65
Author: Benoy Antony <[email protected]>
Date: 2017-05-02T22:17:44Z
ZEPPELIN-2484 do a Null check before calling trim on paragraph's text
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---