BUG: Passing in existing state for a field of type double is not working
See original GitHub issueIn C# see below:
//update the initial state before calling dialog
var state = new MyDialog();
state.StringItem = someString; //this string gets copied into the called dialog
state.StringItem2 = someString2; //this string gets copied into the called dialog
state.DoubleItem = doubleVal; //this double DOES NOT get copied into the called dialog and i am prompted to enter it in the dialog
context.Call(new FormDialog<MyDialog>(state, MyDialog.BuildForm, options: FormOptions.PromptInStart), null);
neither of the following assignment substitutions work either:
state.DoubleItem = 99; //doesn't work
state.DoubleItem = 99d; //nor does this
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
BUG: Passing in existing state for a field of type double is not ...
I believe this is a different issue. The logic to skip fields with existing state is getting called but it's not handling Doubles....
Read more >Bug descriptions — spotbugs 4.7.3 documentation
This document lists the standard bug patterns reported by SpotBugs. ... As most comparators have little or no state, making them serializable is...
Read more >Eclipse error ... cannot be resolved to a type - Stack Overflow
I have a dynamic web project that I am working on to migrate a jsp/servlet app from JRun to Tomcat ...
Read more >Fixing common type problems - Dart programming language
Common type issues you may have and how to fix them.
Read more >Bug Patterns - Error Prone
A constructor cannot have two @Assisted parameters of the same type unless they are disambiguated with named @Assisted annotations. GuiceInjectOnFinalField
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is by design. We have no idea whether or not there is a value in your field–how do we know 0.0 is no value, but 1.0 is a value? If you change your double to be a nullable field then we can distinguish and it will be skipped if you supply a value.
I figured it out right when you posted your reply and after hunting down that chunk of code. Changed my field from a double to a double? and naturally it works. Thanks!