-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Accessors to handle nullable attributes.
For setters, the new behavior is: * For non-string attributes when setting an integer or boolean value, do a CanRepresentValue check and fail if that fails. For string attributes, ensure that strings with 0xFF or 0xFFFF as length cannot be passed in in practice. * For nullable attributes add a SetNull method. * For nullable attributes add a Set() method taking a Nullable<T> and calling either SetNull or the setter that expects a non-null value. For getters, the new behavior is: * When reading a nullable integer or boolean, NaU/NaS is converted to a null value stored in the Nullable. * When reading a non-nullable integer or boolean, return error if CanRepresentValue returns false on the value from the attr store. * When reading a nullable string or octet string, length 0xFFFF/0xFF is converted to a null value stored in the Nullable. * When reading a non-nullable string or octet string, length 0xFFFF/0xFF leads to an error.
- Loading branch information
1 parent
bea4de1
commit 07564e8
Showing
5 changed files
with
12,330 additions
and
1,107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.