Skip to content

Conversation

@benoyantony
Copy link

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

@benoyantony benoyantony changed the title ZEPPELIN-2484 do a Null check before calling trim on paragraph's text [ZEPPELIN-2484] Fix NullPointerException in during check for empty last paragraph May 2, 2017
@Leemoonsoo
Copy link
Member

LGTM and merge to master if no further comments.

@benoyantony benoyantony changed the title [ZEPPELIN-2484] Fix NullPointerException in during check for empty last paragraph [ZEPPELIN-2484] Fix NullPointerException in check for empty last paragraph May 3, 2017
@asfgit asfgit closed this in ae05740 May 5, 2017
michelemilesi pushed a commit to icteam-spa/zeppelin that referenced this pull request May 11, 2017
…graph

### 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

Author: Benoy Antony <[email protected]>

Closes apache#2310 from benoyantony/ZEPPELIN-2484 and squashes the following commits:

1cc2f8b [Benoy Antony] ZEPPELIN-2484 do a Null check before calling trim on paragraph's text
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