Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use safe cast in KeeperRecordData.getField() #699

Open
wants to merge 1 commit into
base: release/sdk/java/core/v17.0.0
Choose a base branch
from

Conversation

maksimu
Copy link
Collaborator

@maksimu maksimu commented Jan 4, 2025

Replace unsafe cast (as T) with safe cast operator (as? T) in getField() to prevent NPE when uploading files to records without FileRef field.

This fixes an issue where attempting to upload a file to a record without an initialized FileRef field would throw:
"null cannot be cast to non-null type FileRef"

Fixes #698

Replace unsafe cast (as T) with safe cast operator (as? T) in getField()
to prevent NPE when uploading files to records without FileRef field.

This fixes an issue where attempting to upload a file to a record
without an initialized FileRef field would throw:
"null cannot be cast to non-null type FileRef"

Fixes #698
@maksimu maksimu requested a review from idimov-keeper January 4, 2025 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants