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:
[email protected]


Reply via email to