[GitHub] drill pull request #1217: DRILL-6302: Fixed NPE in Drillbit close method
GitHub user dvjyothsna opened a pull request: https://github.com/apache/drill/pull/1217 DRILL-6302: Fixed NPE in Drillbit close method @sohami Please review You can merge this pull request into a Git repository by running: $ git pull https://github.com/dvjyothsna/drill DRILL-6302 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/drill/pull/1217.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 #1217 commit 3b2d03ad2011c92961851d8d3c8edc901231e695 Author: dvjyothsna Date: 2018-04-16T18:45:30Z DRILL-6302: Fixed NPE in Drillbit close method ---
[GitHub] drill pull request #1217: DRILL-6302: Fixed NPE in Drillbit close method
Github user sohami commented on a diff in the pull request: https://github.com/apache/drill/pull/1217#discussion_r182302719 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java --- @@ -225,14 +225,18 @@ public synchronized void close() { } final Stopwatch w = Stopwatch.createStarted(); logger.debug("Shutdown begun."); -registrationHandle = coord.update(registrationHandle, State.QUIESCENT); +if (registrationHandle != null) { + registrationHandle = coord.update(registrationHandle, State.QUIESCENT); +} --- End diff -- may be create a private method like `UpdateState(State newState)` and encapsulate null check in that method ---
[GitHub] drill pull request #1217: DRILL-6302: Fixed NPE in Drillbit close method
Github user asfgit closed the pull request at: https://github.com/apache/drill/pull/1217 ---