Return-Path: Delivered-To: apmail-hc-dev-archive@www.apache.org Received: (qmail 91841 invoked from network); 21 Dec 2010 21:00:25 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 Dec 2010 21:00:25 -0000 Received: (qmail 13791 invoked by uid 500); 21 Dec 2010 21:00:25 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 13752 invoked by uid 500); 21 Dec 2010 21:00:25 -0000 Mailing-List: contact dev-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 dev@hc.apache.org Received: (qmail 13741 invoked by uid 99); 21 Dec 2010 21:00:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Dec 2010 21:00:25 +0000 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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Dec 2010 21:00:24 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oBLL01OJ028949 for ; Tue, 21 Dec 2010 21:00:03 GMT Message-ID: <2269827.251431292965201906.JavaMail.jira@thor> Date: Tue, 21 Dec 2010 16:00:01 -0500 (EST) From: "Oleg Kalnichevski (JIRA)" To: dev@hc.apache.org Subject: [jira] Commented: (HTTPCLIENT-1037) FormBodyPart code does not agree with ContentDescriptor Javadoc wrt nullability of mimeType and transferEncoding In-Reply-To: <22114638.226291292888701512.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCLIENT-1037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12973886#action_12973886 ] Oleg Kalnichevski commented on HTTPCLIENT-1037: ----------------------------------------------- I took a closer look at the classes that implement ContentDescriptor and they all return non-null values for mimeType and transferEncoding. I was wrong about javadocs being wrong. FormBodyPart is simply coded defensively. I do not think we have any problem at all. Feel free to change FormBodyPart or re-phrase javadocs of ContentDescriptor, if you deem it necessary. Oleg > FormBodyPart code does not agree with ContentDescriptor Javadoc wrt nullability of mimeType and transferEncoding > ---------------------------------------------------------------------------------------------------------------- > > Key: HTTPCLIENT-1037 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1037 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpMime > Reporter: Sebb > > The FormBodyPart does not agree with ContentDescriptor Javadoc wrt nullability of mimeType and transferEncoding: > The code in FormBodyPart explicitly allows mimeType and transferEncoding to be null, in which case the relevant header is not generated. > This is useful behaviour, as the headers are not necessaruly needed. > However the bahaviour disagrees with the Javadoc in the ContentDescriptor interface - null is not allowed. > Also, AbstractContentBody does not allow mime-type to be null. -- 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: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org