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 865AB200AED for ; Tue, 3 May 2016 22:23:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 84C751609A9; Tue, 3 May 2016 22:23:14 +0200 (CEST) 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 C708E1609F4 for ; Tue, 3 May 2016 22:23:13 +0200 (CEST) Received: (qmail 51682 invoked by uid 500); 3 May 2016 20:23:13 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 51563 invoked by uid 99); 3 May 2016 20:23:12 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 May 2016 20:23:12 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D2F4B2C1F5D for ; Tue, 3 May 2016 20:23:12 +0000 (UTC) Date: Tue, 3 May 2016 20:23:12 +0000 (UTC) From: "Luca Tabone (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CXF-6891) IOUtils.isEmpty() doesn't reinclude byte in stream. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 03 May 2016 20:23:14 -0000 Luca Tabone created CXF-6891: -------------------------------- Summary: IOUtils.isEmpty() doesn't reinclude byte in stream. Key: CXF-6891 URL: https://issues.apache.org/jira/browse/CXF-6891 Project: CXF Issue Type: Bug Components: Tooling Affects Versions: 3.1.6 Reporter: Luca Tabone While trying to integrate Katharsis with CXF I faced a problem regarding IOUtils.isEmpty() method. When isEmpty is invoked with an InputStream that: 1. Is not 'mark supported' and 2. The 'available()' method returns '0'. The byte that is read from the stream (used to determine whether the stream is empty or not) is not re-included back to the stream. When I explored the code inside PushbackInputStream class, I found that the byte is only being included inside the PushbackInputStream.buf (using unread(byte[], int, int) method). -- This message was sent by Atlassian JIRA (v6.3.4#6332)