Less strict builder

29 views
Skip to first unread message

Germán Ferrari

unread,
Apr 8, 2016, 5:12:08 PM4/8/16
to FreeBuilder
Hi.

I would want to use the generated builders as "form backing objects" in Spring MVC views.

The problem I'm having is that the builder throws IllegalStateException when getting a property that is not set, but in this case it would be "useful" if it returned null instead, and do the checks only when the "build" method is called.

It this possible now?
If not: what do you think of having an option to generate this kind of less strict builders?

Thank you very much :)

Regards.
Germán.

Chris Purcell

unread,
Apr 10, 2016, 2:36:54 PM4/10/16
to FreeBuilder
Hi Germán!

Thanks for this feature request! I've opened https://github.com/google/FreeBuilder/issues/121 to track further discussion. If you have the inclination to submit a PR for this, I'd be very happy to review; otherwise, it may take a while to get prioritised.

Thanks!
Chris

Germán Ferrari

unread,
Apr 10, 2016, 4:03:07 PM4/10/16
to FreeBuilder
Ok. I will add further comments on the linked issue.

Thanks!
Reply all
Reply to author
Forward
0 new messages