[
https://issues.apache.org/jira/browse/CAMEL-27967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-27967:
--------------------------------
Description:
Found while improving the option descriptions of camel-box for CAMEL-23832
(commit
https://github.com/apache/camel/commit/a43fa856bf61a24517ac0d3fbc25e0e83b77792d,
pull request https://github.com/apache/camel/pull/31200).
These are separate problems of the component; the descriptions change only
documents the current behavior.
h4. 1. createFileSharedLink and createFolderSharedLink fail without permissions
or unshareDate
{{BoxFilesManager.createFileSharedLink}} and
{{BoxFoldersManager.createFolderSharedLink}} throw a NullPointerException when
permissions is null (permissions.getCanDownload()) or unshareDate is null
(BoxSharedLink.setUnsharedDate calls BoxDateFormat.format(null)). Both are
nullableOptions in the pom, and BoxFilesManagerIT.testCreateFileSharedLink
passes null for both. The descriptions now say the method fails when they are
not set.
Proposed change: only call .unsharedDate(..) and .permissions(..) when the
value is not null.
h4. 2. httpParams only applies to the standard login
{{BoxConnectionHelper}} only uses httpParams (http.route.default-proxy,
http.route.socks-proxy) for the jsoup login requests of
STANDARD_AUTHENTICATION; the BoxAPIConnection gets no proxy, so the API calls
and both JWT types ignore it.
Proposed change: also call BoxAPIConnection.setProxy(proxy).
h4. 3. Smaller issues
BoxFilesManager.uploadNewFileVersion ignores fileSize and listener when
modified is null (it calls uploadNewVersion(fileContent)); the SDK accepts a
null modified. BoxUsersManager.getAllEnterpriseOrExternalUsers returns managed
users only, and ignores fields when filterTerm is null. copyFile, moveFile and
renameFile check destinationFolderId and newFileName with BoxHelper.VERSION, so
the error names "version". checkUpload marks size optional though it is
required. The pom aliases getDownloadUrl=url, getPreviewLink=preview and
getFileThumbnail=thumbnail never match a method. The apiName enum lists the
Java constants (COLLABORATIONS, EVENT_LOGS) instead of the URI names.
_Claude Code on behalf of davsclaus_
was:
Found while improving the option descriptions of camel-box for CAMEL-23832
(pull request https://github.com/apache/camel/pull/31200).
These are separate problems of the component; the descriptions change only
documents the current behavior.
h4. 1. createFileSharedLink and createFolderSharedLink fail without permissions
or unshareDate
{{BoxFilesManager.createFileSharedLink}} and
{{BoxFoldersManager.createFolderSharedLink}} throw a NullPointerException when
permissions is null (permissions.getCanDownload()) or unshareDate is null
(BoxSharedLink.setUnsharedDate calls BoxDateFormat.format(null)). Both are
nullableOptions in the pom, and BoxFilesManagerIT.testCreateFileSharedLink
passes null for both. The descriptions now say the method fails when they are
not set.
Proposed change: only call .unsharedDate(..) and .permissions(..) when the
value is not null.
h4. 2. httpParams only applies to the standard login
{{BoxConnectionHelper}} only uses httpParams (http.route.default-proxy,
http.route.socks-proxy) for the jsoup login requests of
STANDARD_AUTHENTICATION; the BoxAPIConnection gets no proxy, so the API calls
and both JWT types ignore it.
Proposed change: also call BoxAPIConnection.setProxy(proxy).
h4. 3. Smaller issues
BoxFilesManager.uploadNewFileVersion ignores fileSize and listener when
modified is null (it calls uploadNewVersion(fileContent)); the SDK accepts a
null modified. BoxUsersManager.getAllEnterpriseOrExternalUsers returns managed
users only, and ignores fields when filterTerm is null. copyFile, moveFile and
renameFile check destinationFolderId and newFileName with BoxHelper.VERSION, so
the error names "version". checkUpload marks size optional though it is
required. The pom aliases getDownloadUrl=url, getPreviewLink=preview and
getFileThumbnail=thumbnail never match a method. The apiName enum lists the
Java constants (COLLABORATIONS, EVENT_LOGS) instead of the URI names.
_Claude Code on behalf of davsclaus_
> camel-box: shared links fail without permissions or unshare date, httpParams
> proxy ignored by the API client
> ------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-27967
> URL: https://issues.apache.org/jira/browse/CAMEL-27967
> Project: Camel
> Issue Type: Bug
> Components: camel-box
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-box for CAMEL-23832
> (commit
> https://github.com/apache/camel/commit/a43fa856bf61a24517ac0d3fbc25e0e83b77792d,
> pull request https://github.com/apache/camel/pull/31200).
> These are separate problems of the component; the descriptions change only
> documents the current behavior.
> h4. 1. createFileSharedLink and createFolderSharedLink fail without
> permissions or unshareDate
> {{BoxFilesManager.createFileSharedLink}} and
> {{BoxFoldersManager.createFolderSharedLink}} throw a NullPointerException
> when permissions is null (permissions.getCanDownload()) or unshareDate is
> null (BoxSharedLink.setUnsharedDate calls BoxDateFormat.format(null)). Both
> are nullableOptions in the pom, and
> BoxFilesManagerIT.testCreateFileSharedLink passes null for both. The
> descriptions now say the method fails when they are not set.
> Proposed change: only call .unsharedDate(..) and .permissions(..) when the
> value is not null.
> h4. 2. httpParams only applies to the standard login
> {{BoxConnectionHelper}} only uses httpParams (http.route.default-proxy,
> http.route.socks-proxy) for the jsoup login requests of
> STANDARD_AUTHENTICATION; the BoxAPIConnection gets no proxy, so the API calls
> and both JWT types ignore it.
> Proposed change: also call BoxAPIConnection.setProxy(proxy).
> h4. 3. Smaller issues
> BoxFilesManager.uploadNewFileVersion ignores fileSize and listener when
> modified is null (it calls uploadNewVersion(fileContent)); the SDK accepts a
> null modified. BoxUsersManager.getAllEnterpriseOrExternalUsers returns
> managed users only, and ignores fields when filterTerm is null. copyFile,
> moveFile and renameFile check destinationFolderId and newFileName with
> BoxHelper.VERSION, so the error names "version". checkUpload marks size
> optional though it is required. The pom aliases getDownloadUrl=url,
> getPreviewLink=preview and getFileThumbnail=thumbnail never match a method.
> The apiName enum lists the Java constants (COLLABORATIONS, EVENT_LOGS)
> instead of the URI names.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)