[ 
https://issues.apache.org/jira/browse/CAMEL-22737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-22737.
---------------------------------
    Resolution: Fixed

Thanks for the PR

> camel-as2: MimeEntity::parseEntityBody causes NPE for unsupported mime types
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-22737
>                 URL: https://issues.apache.org/jira/browse/CAMEL-22737
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-as2
>    Affects Versions: 4.16.0
>            Reporter: Jürgen Link
>            Priority: Minor
>             Fix For: 4.17.0
>
>
> When parsing an entity body with an unsupported type (e.g. 
> application/octet-stream), the method parseEntityBody returns null. Some 
> callers do an null check explicitly, while others don't (e.g. 
> parseMultipartSignedEntityBody).
> This behavior leads to a NullPointerException, effectively hiding the root 
> cause of the issue. I'd like to suggest to throw an 
> AS2DecryptionException({color:#008000}"Unsupported entity content type: " 
> {color}+ entityContentType), instead of returning null in the default case.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to