You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by GitBox <gi...@apache.org> on 2020/12/10 09:06:59 UTC

[GitHub] [zeppelin] Reamer commented on a change in pull request #3989: [ZEPPELIN-5150]. Allow option to allow exclude paragraph result when saving note to NotebookRepo

Reamer commented on a change in pull request #3989:
URL: https://github.com/apache/zeppelin/pull/3989#discussion_r539993141



##########
File path: zeppelin-server/src/main/java/org/apache/zeppelin/service/SessionManagerService.java
##########
@@ -173,7 +173,7 @@ public SessionInfo getSessionInfo(String sessionId) throws Exception {
         } else {
           // if it is running before, but interpreterGroup is not running now, that means the session is stopped.
           // e.g. InterpreterProcess is terminated for whatever unexpected reason.
-          if (sessionInfo.getState().equals(SessionState.RUNNING.name())) {
+          if (sessionInfo.getState() != null && sessionInfo.getState().equals(SessionState.RUNNING.name())) {

Review comment:
       You could swap the objects of the 'equals'. A null check should then no longer be necessary.
   ```
   SessionState.RUNNING.name().equals(sessionInfo.getState())
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org