kshchepanovskyi / protostuff-googlecode-exported

Automatically exported from code.google.com/p/protostuff

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Default value of optional bool properties is ignored.

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
1. create message with an optional bool field
2. set the default value to false False or FALSE
3. generate java class

What is the expected output? What do you see instead?
the created variable should not be null or the get method should not return 
null if that is the case

What version of the product are you using? On what operating system?
1.0.7

Original issue reported on code.google.com by baetz.al...@googlemail.com on 19 Jul 2012 at 1:52

Try setting the default value to true and it will generate the correct code.
The problem was the <if(field.defaultValue)> was evaluating to false.
I've now changed it to <if(field.defaultValueSet)>

Fixed @ Rev 1547

Original comment by david.yu...@gmail.com on 19 Jul 2012 at 5:25

  • Changed state: Fixed
Is there a release version of protostuff where this is fixed?

Original comment by lot...@gmail.com on 26 Sep 2013 at 2:33

Not yet.  I transferred to another pc (laptop) and right now I'm having trouble 
with mvn release:prepare

The svn command failed.
Command output:
svn: E170001: Commit failed (details follow):
svn: E170001: MKACTIVITY of 
'/svn/!svn/act/72e0c29e-745c-46f3-97a1-a1f406f8108f': authorization failed: 
Could not authenticate to server: rejected Basic challenge 
(https://protostuff.googlecode.com)

I've done all my releases in my old pc

Original comment by david.yu...@gmail.com on 26 Sep 2013 at 6:46

[deleted comment]
I'm interested in this fix as well. thx!

Original comment by peterbol...@gmail.com on 17 Oct 2013 at 10:44

Thank you for releasing the fix in 1.0.8!

Original comment by lot...@gmail.com on 20 Mar 2014 at 2:58

You're welcome (sorry it took longer :-/)

Original comment by david.yu...@gmail.com on 20 Mar 2014 at 3:29