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

Remove Serializable from POJOs since they aren't (necessarily) #45

Closed
joelittlejohn opened this issue Jun 23, 2013 · 1 comment
Closed
Milestone

Comments

@joelittlejohn
Copy link
Owner

Original author: joelittl...@gmail.com (April 18, 2012 22:15:06)

jsonschema2pojo requires only that Jackson can serialize the generated types, not that they must be serializable according to java.io.Serializable. This interface should be removed from generated POJOs.

It's possible to create a schema that causes types to generated that have references to java.lang.Object. It's also possible to reference just about any non-serializable class using the javaType property. When this happens, static code analysis tools like findbugs show warnings (since instances can no longer be guaranteed to be serializable).

After this fix, generated POJOs will no longer implement java.io.Serializable.

Original issue: http://code.google.com/p/jsonschema2pojo/issues/detail?id=45

@joelittlejohn
Copy link
Owner Author

From joelittl...@gmail.com on April 20, 2012 22:27:46
Done (rcd3e5b63a3b6).

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

No branches or pull requests

1 participant