secrets-manager icon indicating copy to clipboard operation
secrets-manager copied to clipboard

KSM-582: fix NPE use safe cast in KeeperRecordData.getField()

Open maksimu opened this issue 1 year ago • 0 comments

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 avatar Jan 04 '25 05:01 maksimu