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

Serializers for Guava predicates #25

Closed
shevek opened this issue Sep 22, 2014 · 4 comments
Closed

Serializers for Guava predicates #25

shevek opened this issue Sep 22, 2014 · 4 comments

Comments

@shevek
Copy link

shevek commented Sep 22, 2014

Most of the builtin Predicates in guava's Predicates.java implement Serializable but are not serializable by Kryo by default. Please can there be a utility class which registers these as a block, e.g. Predicates.containsPattern(String).getClass(), etc.

@magro
Copy link
Owner

magro commented Sep 22, 2014

Do you want to submit a pull request? I can make the release then.

@shevek
Copy link
Author

shevek commented Sep 23, 2014

Given the code in #26, one can do kryo.register(Predicates.containsPattern("foo").getClass(), new SerializableSerializer<Predicate<CharSequence>>());

@shevek
Copy link
Author

shevek commented Sep 23, 2014

Actually, beyond that, it would be useful to have a set of recipe classes, so that e.g. GuavaSerializers.register(kryo) or JdkSerializers.register(kryo) could apply all recipes relevant to a given environment or dependency library which one might be using.

@shevek
Copy link
Author

shevek commented Sep 24, 2014

Closed bsaed on closure of #26

@shevek shevek closed this as completed Sep 24, 2014
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

2 participants