Jürgen Link created CAMEL-22737:
-----------------------------------
Summary: 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: Bug
Components: camel-as2
Affects Versions: 4.16.0
Reporter: Jürgen Link
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)