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

Cannot be serialized #48

Open
chekanov opened this issue Aug 16, 2015 · 4 comments
Open

Cannot be serialized #48

chekanov opened this issue Aug 16, 2015 · 4 comments

Comments

@chekanov
Copy link

Hello,

The current of exp4j breaks the serialization mechanism of the DMelt project (http:/jwork.org/dmelt/).
For example, the objects created by the class Expression and ExpressionBuilder cannot be serialized
(java.io.NotSerializableException) due to the keys used to create maps inside exp4j. This problem exists after adding " implements java.io.Serializable" statements for Expression and ExpressionBuilder classes.

best, Sergei

@leogtzr
Copy link
Contributor

leogtzr commented Aug 16, 2015

Have you tried adding "implements Serializable" to the remaining classes?
I agree that we should implement from Serializable.

@chekanov
Copy link
Author

Yes, of course. I've added "implements Serializable" to Expression and ExpressionBuilder. It still cannot be serialized. It has a long sting of exceptions that seems related to the unserializable keys of the map used to evaluate expression.

@leogtzr
Copy link
Contributor

leogtzr commented Aug 16, 2015

You have to do the same with Function, Operator, etc ...

@fasseg
Copy link
Owner

fasseg commented Jan 30, 2017

@chekanov: Currently this is out of scope for exp4j. But I'll leave this feature request open if someone wants to chime in and supply a PR.

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

No branches or pull requests

3 participants