You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However this does not seem to work for classes containing lambdas:
java.lang.ClassNotFoundException: eval.fst.EvalFst$NoSerializableLambda$$Lambda$3/205962452
class NoSerializableLambda {
Predicate filter = (s) -> s.startsWith("a");
}
Is there a way to configure FST so also lambdas can be serialized?
The text was updated successfully, but these errors were encountered:
try Predicate<String> filter = (Predicate<String> & Serializable) (s) -> s.startsWith("a");
this will make the lambda serializable
idk if there are other solutions
I'm aware of how lambdas can be made explicitly Serializable as shown, thanks.
The interesting part however would be whether FST somehow manages to serialize lambdas not defined as Serializable, as it manages to serialize classes not implementing Serialiazable.
I try to use FST to serialize Java objects where not all contained instances are Serializable by using
FSTConfiguration.getDefaultConfiguration().setForceSerializable(true)
However this does not seem to work for classes containing lambdas:
java.lang.ClassNotFoundException: eval.fst.EvalFst$NoSerializableLambda$$Lambda$3/205962452
class NoSerializableLambda {
Predicate filter = (s) -> s.startsWith("a");
}
Is there a way to configure FST so also lambdas can be serialized?
The text was updated successfully, but these errors were encountered: