Skip to content
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

allow missing build method if its name is empty "" #777

Closed
wants to merge 1 commit into from

Conversation

galdosd
Copy link

@galdosd galdosd commented Apr 30, 2015

This allows builder-like objects whose class is its own builder class,
no need to convert later from the Builder type to the "real" type
with a final build()

This works well for immutable classes with Project Lombok if you use lombok's @wither and was the best way I found to be able to integrate jackson and lombok

Missing unit test for now, so not quite ready for merge, but thought I'd start the PR anyway in case of any other feedback

This allows builder-like objects whose class is its own builder class,
no need to convert later from the Builder type to the "real" type
with a final build()

This works well for the immutable classes Project Lombok will give you
if you use @wither
@cowtowncoder
Copy link
Member

Sounds reasonable enough to me. A unit test would be useful yes. And also javadoc note for @JsonPOJOBuilder to mention that such use is legal.
I'll be happy to merge this when ready.

One practical thing in the meantime: before the first merge, we need a Contributor License Agreement (CLA), from here:

https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf

and all that is needed is to print, fill & sign, scan and email to info at fasterxml dot com.
Apologies for the hassle, but we need since many corporations that use open-source libraries want to know we have a process to ensure contributions are made appropriately. This seems to do the trick.
Once we get this, we can merge any and all patches for all Jackson projects, so it is just a one-time thing.

Looking forward to complete patch, especially since it makes it easier to use Jackson with Lombok types. Interoperability is very important, and I use immutable classes a lot myself (although just "plain" Java ones so far).

@cowtowncoder
Copy link
Member

@galdosd Sorry to bug you, but is it possible to get the CLA? I am hoping to include this fix in 2.6.0.
Not super urgent (we are still couple weeks away) but wanted to ping early enough.

@cowtowncoder
Copy link
Member

Equivalent fix checked in, hence closing this as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants