title: What is dereferencing possible null pointer?
body: <p>I am making a program for <code>SFTP</code> in <code>NetBeans</code>.</p>
  
  <p>Some part of My code:</p>
  
  <pre><code>com.jcraft.jsch.Session sessionTarget = null;
  com.jcraft.jsch.ChannelSftp channelTarget = null;
  try {
         sessionTarget = jsch.getSession(backupUser, backupHost, backupPort);
         sessionTarget.setPassword(backupPassword);
         sessionTarget.setConfig("StrictHostKeyChecking", "no");
         sessionTarget.connect();
         channelTarget = (ChannelSftp) sessionTarget.openChannel("sftp");
         channelTarget.connect();
  
         System.out.println("Target Channel Connected");
         } catch (JSchException e) {
              System.out.println("Error Occured ======== Connection not estabilished");
              log.error("Error Occured ======== Connection not estabilished", e);
         } finally {
              channelTarget.exit();     // Warning : dereferencing possible null pointer
              channelTarget.disconnect();  // Warning : dereferencing possible null pointer
              sessionTarget.disconnect();  // Warning : dereferencing possible null pointer
          }
  </code></pre>
  
  <p>I'm getting warning <code>dereferencing possible null pointer</code>, how can I resolve these warnings???
  Where I can disconnect my <code>Session</code> and <code>Channel</code>???</p>