You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2010/12/21 00:45:01 UTC

[jira] Created: (HTTPCLIENT-1037) FormBodyPart code does not agree with ContentDescriptor Javadoc wrt nullability of mimeType and transferEncoding

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


[jira] Commented: (HTTPCLIENT-1037) FormBodyPart code does not agree with ContentDescriptor Javadoc wrt nullability of mimeType and transferEncoding

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12973881#action_12973881 ] 

Oleg Kalnichevski commented on HTTPCLIENT-1037:
-----------------------------------------------

ContentDescriptor was copied from mime4j and its javadocs are wrong with regards to nullability of mimeType and transferEncoding.

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


[jira] Commented: (HTTPCLIENT-1037) FormBodyPart code does not agree with ContentDescriptor Javadoc wrt nullability of mimeType and transferEncoding

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ 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


[jira] Resolved: (HTTPCLIENT-1037) FormBodyPart code does not agree with ContentDescriptor Javadoc wrt nullability of mimeType and transferEncoding

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1037?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb resolved HTTPCLIENT-1037.
------------------------------

    Resolution: Fixed

Fixed in r1051664

> 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