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:27:00 UTC
[jira] [Commented] (CAMEL-15424) camel-box: addFolderCollaboration
may throw an NPE
[ https://issues.apache.org/jira/browse/CAMEL-15424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17180354#comment-17180354 ]
Otavio Rodolfo Piske commented on CAMEL-15424:
----------------------------------------------
I have the patch and reproducer ready. I'll send a PR soon.
> 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.5.0, 3.4.3
> Reporter: Otavio Rodolfo Piske
> Priority: Major
>
> 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)