[
https://issues.apache.org/jira/browse/CAMEL-28064?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Guillaume Nodet reassigned CAMEL-28064:
---------------------------------------
Assignee: (was: Guillaume Nodet)
> camel-box - shared link NPE, wrong parameter names in errors and required
> options that Box makes optional
> ---------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-28064
> URL: https://issues.apache.org/jira/browse/CAMEL-28064
> Project: Camel
> Issue Type: Bug
> Components: camel-box
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: 4.25.0
>
>
> h4. 1. createFileSharedLink / createFolderSharedLink fail without unshareDate
> or permissions
> BoxFilesManager.java:520 calls permissions.getCanDownload() and passes
> unshareDate to the SDK date formatting without null checks, so the call fails
> with NullPointerException when either is not set, although both are declared
> nullable options (createFolderSharedLink, BoxFoldersManager.java:387, the
> same; there they are declared required). The Box API makes both optional.
> BoxFilesManagerIT:124-126 and BoxFoldersManagerIT:149 pass null, so these ITs
> cannot pass. Proposed change: only set them on the BoxSharedLinkRequest when
> not null, and declare them nullable for folders too.
> h4. 2. Wrong parameter name in the missing-parameter errors
> copyFile and moveFile check destinationFolderId with BoxHelper.VERSION
> (BoxFilesManager.java:394 and :422), so the error says "Parameter 'version'";
> renameFile does the same for newFileName (:446). Proposed change: use the
> right names.
> h4. 3. getAllEnterpriseOrExternalUsers with filterTerm and no fields: NPE
> BoxUsersManager.java:91 passes a null fields array, and the SDK reads
> fields.length. Proposed change: pass an empty array when fields is null.
> h4. 4. getAllGroups / searchFolder return objects with only the id
> BoxGroupsManager.java:63 and BoxSearchManager.java:85 build new
> BoxGroup/BoxItem objects from the ids and drop the info Box already returned.
> Proposed change: return the info objects (or keep their info), mind the
> compatibility of the result type.
> h4. 5. updateCollaborationInfo does not check info
> BoxCollaborationsManager.java:156 uses info without BoxHelper.notNull, unlike
> the other update methods.
> h4. 6. addFileTask requires dueAt
> BoxTasksManager.java:90 requires dueAt, but the SDK and the Box API make it
> optional. Proposed change: make it nullable.
> Found while writing the API method and parameter descriptions of CAMEL-27980
> (https://github.com/apache/camel/pull/31273).
> _Filed by Claude Code on behalf of Claus Ibsen_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)