Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
8301302: Platform preferences API #1014
8301302: Platform preferences API #1014
Changes from 1 commit
2d28c85
df03228
ba26271
00e9eb7
dbad68d
e16491a
2d1c7a9
0589078
f8a9c8a
40e2f28
b100c6c
4b9f75d
27022f3
02d6a2f
4172fa6
5081fda
08a3692
2837e33
9cfded0
c8fd0e7
1eaea48
c736dee
aae55f9
cb81762
a893fa4
8a5b213
7e826df
684f48b
167d4e8
ad74e39
38177a8
d012dec
9b607c6
6ec7e99
3cc29e9
9a817d1
bb6071c
a3d0010
17b2b08
9083d3e
9adef99
57c8d0c
bee1bae
89f1c8f
9cc3b4b
dbf24bf
0572a36
f291ea4
a04a8c6
0dff7a4
6c37544
db393fc
0759ddd
a2bd32d
070eab5
515395b
098ca17
eac1d82
efdab27
20cccc5
6457503
3354782
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this behavior be documented?
there is no mention of an exception in case of type mismatch in the base class.
also, do we want to have some kind of trivial conversion implemented such as int -> long -> double ?
or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is documented in the
Platform.Preferences
interface, which is implemented by this class:I'm a bit hesitant regarding an automatic conversion. What would be the use case for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one [possible] use case is when different versions of the native platform have different types (int32/int64 ?).
or, if the property value is String with the semantics of an integer.
Of course, the app dev can always request an Object and parse that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we add this, we'd also need to decide whether we only want to support lossless conversions, or if lossy conversions are acceptable as well. Since this will add a considerable amount of complexity to this PR, I suggest we don't to it at this time. If there's a need, we can always add it later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after some thought, I would say conversion is not needed - should that unlikely scenario happen, the app devs could use getValue(.., Object.class);