You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Otavio Rodolfo Piske (Jira)" <ji...@apache.org> on 2020/08/19 08:26:00 UTC
[jira] [Created] (CAMEL-15424) camel-box: addFolderCollaboration
may throw an NPE
Otavio Rodolfo Piske created CAMEL-15424:
--------------------------------------------
Summary: camel-box: addFolderCollaboration may throw an NPE
Key: CAMEL-15424
URL: https://issues.apache.org/jira/browse/CAMEL-15424
Project: Camel
Issue Type: Bug
Components: camel-box
Affects Versions: 3.4.3, 3.5.0
Reporter: Otavio Rodolfo Piske
The [code|https://github.com/apache/camel/blob/26392dfd37f7bd079a11bb48defb587d827df5b5/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxCollaborationsManager.java#L89] is de-referencing the collaborator before checking whether it is null, which can cause an NPE.
It can also happen on [3.4.3|https://github.com/apache/camel/blob/camel-3.4.3/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxCollaborationsManager.java#L94].
{code:java}
Caused by: java.lang.NullPointerException
at org.apache.camel.component.box.api.BoxCollaborationsManager.addFolderCollaboration(BoxCollaborationsManager.java:90)
at org.apache.camel.component.box.BoxCollaborationsManagerTest.lambda$testAddFolderCollaborationNullFolderId$1(BoxCollaborationsManagerTest.java:37)
at org.junit.jupiter.api.AssertThrows.assertThrows(AssertThrows.java:55)
... 66 more{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)