Return-Path: Delivered-To: apmail-ws-commons-dev-archive@locus.apache.org Received: (qmail 67390 invoked from network); 6 Mar 2008 18:16:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Mar 2008 18:16:13 -0000 Received: (qmail 37682 invoked by uid 500); 6 Mar 2008 18:16:09 -0000 Delivered-To: apmail-ws-commons-dev-archive@ws.apache.org Received: (qmail 37654 invoked by uid 500); 6 Mar 2008 18:16:09 -0000 Mailing-List: contact commons-dev-help@ws.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: commons-dev@ws.apache.org Delivered-To: mailing list commons-dev@ws.apache.org Received: (qmail 37625 invoked by uid 99); 6 Mar 2008 18:16:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Mar 2008 10:16:09 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Mar 2008 18:15:41 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0CCBB234C0A4 for ; Thu, 6 Mar 2008 10:14:58 -0800 (PST) Message-ID: <2015151530.1204827298050.JavaMail.jira@brutus> Date: Thu, 6 Mar 2008 10:14:58 -0800 (PST) From: "Rich Scheuerle (JIRA)" To: commons-dev@ws.apache.org Subject: [jira] Work started: (WSCOMMONS-275) The read methods of org.apache.axiom.attachments.MIMEBodyPartInputStream return "0" in no more data. In-Reply-To: <14892992.1194612650790.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/WSCOMMONS-275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Work on WSCOMMONS-275 started by Rich Scheuerle. > The read methods of org.apache.axiom.attachments.MIMEBodyPartInputStream return "0" in no more data. > ---------------------------------------------------------------------------------------------------- > > Key: WSCOMMONS-275 > URL: https://issues.apache.org/jira/browse/WSCOMMONS-275 > Project: WS-Commons > Issue Type: Bug > Components: AXIOM > Reporter: Kazushi KANESHIRO > Assignee: Rich Scheuerle > Priority: Blocker > > axiom-1.2.5-src\modules\axiom-api\src\main\java\org\apache\axiom\attachments\ > MIMEBodyPartInputStream.java > has bugs. > line 85 > Please replace > return 0; > by > return -1; > line 99 > Please replace > return 0; > by > return -1; > Because > read(byte[] b, int off, int len) > and > read(byte[] b) > must return -1 according to the specification of java.io.InputStream. > See > http://java.sun.com/javase/6/docs/api/java/io/InputStream.html#read(byte[], int, int) > http://java.sun.com/javase/6/docs/api/java/io/InputStream.html#read(byte[]) > public int read(byte[] b, > int off, > int len) > throws IOException > Returns: > the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached. > public int read(byte[] b) > throws IOException > Returns: > the total number of bytes read into the buffer, or -1 is there is no more data because the end of the stream has been reached. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org For additional commands, e-mail: commons-dev-help@ws.apache.org