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 6CDC7200828 for ; Fri, 13 May 2016 15:26:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6B909160A12; Fri, 13 May 2016 13:26:14 +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 E4A3716099F for ; Fri, 13 May 2016 15:26:13 +0200 (CEST) Received: (qmail 54394 invoked by uid 500); 13 May 2016 13:26:13 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 54382 invoked by uid 99); 13 May 2016 13:26:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 May 2016 13:26:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id CE8812C1F5D for ; Fri, 13 May 2016 13:26:12 +0000 (UTC) Date: Fri, 13 May 2016 13:26:12 +0000 (UTC) From: =?utf-8?Q?J=C3=BCrgen_Kindler_=28JIRA=29?= To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CAMEL-9965) Throw meaningful exception of a streamed body has been consumed already MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 13 May 2016 13:26:14 -0000 J=C3=BCrgen Kindler created CAMEL-9965: ------------------------------------- Summary: Throw meaningful exception of a streamed body has bee= n consumed already Key: CAMEL-9965 URL: https://issues.apache.org/jira/browse/CAMEL-9965 Project: Camel Issue Type: Improvement Components: camel-cxf Affects Versions: 2.16.3 Reporter: J=C3=BCrgen Kindler Fix For: 2.16.4 As I see in CAMEL-9864 there is an incompatible change about the usage of h= ttp://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Me= ssage.html#getBody%28java.lang.Class%29 in case the underlying body is subj= ect to streaming. I understand the reasons for that change, but usually Java getters are assu= med to be not modifying the underlying object. So it would be nice to add a small hint in the API that indicates that getB= ody may not be callable multiple times (esp. in context of streams) In case a stream was already consumed throwing a meaningful exception with = a hint about how to fix this (either *not* call the method altogether or sw= itching on stream caching ...) would be great. -- This message was sent by Atlassian JIRA (v6.3.4#6332)