Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D6BE0200B4D for ; Sat, 23 Jul 2016 13:03:17 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CA318160A74; Sat, 23 Jul 2016 11:03:17 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1B54F160A67 for ; Sat, 23 Jul 2016 13:03:16 +0200 (CEST) Received: (qmail 69364 invoked by uid 500); 23 Jul 2016 11:03:15 -0000 Mailing-List: contact commits-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list commits@hc.apache.org Received: (qmail 69355 invoked by uid 99); 23 Jul 2016 11:03:15 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 23 Jul 2016 11:03:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 69560C61BE for ; Sat, 23 Jul 2016 11:03:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.287 X-Spam-Level: X-Spam-Status: No, score=-0.287 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-1.287] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 18uNrhTVgV-4 for ; Sat, 23 Jul 2016 11:03:14 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 717A25F2C5 for ; Sat, 23 Jul 2016 11:03:14 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 991C5E0054 for ; Sat, 23 Jul 2016 11:03:13 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id C6D393A039C for ; Sat, 23 Jul 2016 11:03:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1753867 - /httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/ssl/SSLIOSession.java Date: Sat, 23 Jul 2016 11:03:12 -0000 To: commits@hc.apache.org From: olegk@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160723110312.C6D393A039C@svn01-us-west.apache.org> archived-at: Sat, 23 Jul 2016 11:03:18 -0000 Author: olegk Date: Sat Jul 23 11:03:12 2016 New Revision: 1753867 URL: http://svn.apache.org/viewvc?rev=1753867&view=rev Log: Removed unnecessary null assignments Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/ssl/SSLIOSession.java Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/ssl/SSLIOSession.java URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/ssl/SSLIOSession.java?rev=1753867&r1=1753866&r2=1753867&view=diff ============================================================================== --- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/ssl/SSLIOSession.java (original) +++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/reactor/ssl/SSLIOSession.java Sat Jul 23 11:03:12 2016 @@ -307,8 +307,8 @@ public class SSLIOSession implements IOS // Process incoming handshake data // Acquire buffers - ByteBuffer inEncryptedBuf = this.inEncrypted.acquire(); - ByteBuffer inPlainBuf = this.inPlain.acquire(); + final ByteBuffer inEncryptedBuf = this.inEncrypted.acquire(); + final ByteBuffer inPlainBuf = this.inPlain.acquire(); // Perform operations inEncryptedBuf.flip(); @@ -324,13 +324,11 @@ public class SSLIOSession implements IOS // Release inEncrypted if empty if (inEncryptedBuf.position() == 0) { this.inEncrypted.release(); - inEncryptedBuf = null; } } if (this.status >= IOSession.CLOSING) { this.inPlain.release(); - inPlainBuf = null; } if (result.getStatus() != Status.OK) { handshaking = false; @@ -559,7 +557,7 @@ public class SSLIOSession implements IOS } if (this.outPlain.hasData()) { // Acquire buffers - ByteBuffer outPlainBuf = this.outPlain.acquire(); + final ByteBuffer outPlainBuf = this.outPlain.acquire(); final ByteBuffer outEncryptedBuf = this.outEncrypted.acquire(); // Perform operations @@ -570,7 +568,6 @@ public class SSLIOSession implements IOS // Release outPlain if empty if (outPlainBuf.position() == 0) { this.outPlain.release(); - outPlainBuf = null; } } if (!this.outPlain.hasData()) { @@ -588,7 +585,7 @@ public class SSLIOSession implements IOS Args.notNull(dst, "Byte buffer"); if (this.inPlain.hasData()) { // Acquire buffer - ByteBuffer inPlainBuf = this.inPlain.acquire(); + final ByteBuffer inPlainBuf = this.inPlain.acquire(); // Perform opertaions inPlainBuf.flip(); @@ -601,7 +598,6 @@ public class SSLIOSession implements IOS // Release if empty if (inPlainBuf.position() == 0) { this.inPlain.release(); - inPlainBuf = null; } return n; }